Logo/

Basic Programming - Control Flows and Structures

Log in

Made with ScholarlyMake flashcards like these from your own notes

Basic Programming - Control Flows and Structures

Questions and answers

12 cards
  1. Question:What is the simplest statement in C?

    Answer:An expression followed by a semicolon.

  2. Question:What are jumping statements in C?

    Answer:return, break, continue, and goto

  3. Question:What is a compound statement?

    Answer:Multiple statements grouped into a block by braces {...} that are syntactically equivalent to a single statement

  4. Question:What structures are included in structured programming?

    Answer:Sequence, conditional branches, and loop

  5. Question:What is a sequential structure in C?

    Answer:All statements are executed exactly once and in the same order specified in the program

  6. Question:What is a branch structure in C?

    Answer:Involves conditional or logical expressions or decision making

  7. Question:What is a simple conditional expression in C?

    Answer:An expression using relational operators that evaluates to either true or false

  8. Question:What is an example of a simple conditional expression in C?

    Answer:int a=4; int b=5; if(a<b){printf("You havenohomeworks");}

  9. Question:What is a basic if statement in C?

    Answer:A statement used to make decisions with a conditional expression followed by a statement or a series of statements

  10. Question:What is an example of a basic if statement in C?

    Answer:if(expression) Statement;

  11. Question:What are the logical operators in C?

    Answer:&&,

  12. Question:What is an example of a compound statement in C?

    Answer:if(i>0){line[i]=x; x++; i--;}