PDF Notes: Structured programming

    Master this deck with 17 terms through effective study methods.

    Generated from uploaded pdf

    Created by @ahmd

    What is structured programming?

    Focuses on clear control flow and modular code.

    What does cout do?

    Outputs data to the console.

    What is the purpose of cin?

    Takes input from the user.

    How does a for loop differ from a while loop?

    For loop has a known iteration count; while loop does not.

    What happens if the condition in a do while loop is false?

    The loop executes at least once.

    What is the role of if statements?

    Selects code execution based on conditions.

    How does a switch statement function?

    Handles multiple conditions based on fixed values.

    What does the continue statement do in a loop?

    Skips the current iteration and continues with the next.

    What is a struct in programming?

    Groups different data types into a single object.

    What is an enum?

    Defines a set of named integer constants.

    What is function overloading?

    Using the same function name with different parameters.

    What is recursion in functions?

    A function calls itself to solve a problem.

    What is the difference between pass by value and pass by reference?

    Pass by value copies data; pass by reference allows modification.

    What does an array represent?

    A collection of elements of the same type.

    How do you declare a 2D array?

    Using two indices to access elements.

    What is a C-string?

    An array of characters ending with a null character.

    What does strcpy do?

    Copies a string from source to destination.