Control Structures- Quiz 1

10 Questions | Attempts: 461
Share

SettingsSettingsSettings
Control Structures- Quiz 1 - Quiz


Questions and Answers
  • 1. 
    Answer the output of the following program.
    • A. 

      300 200

    • B. 

      200 300

    • C. 

      Garbage Garbage

    • D. 

      Garbage 200

  • 2. 
    Answer the output of the following program.
    • A. 

      500 300

    • B. 

      300 200

    • C. 

      Garbage 200 

    • D. 

      300 300

  • 3. 
    Answer the output of the following program.
    • A. 

      10 20

    • B. 

      Error

    • C. 

      20 10

    • D. 

      " If " loop cannot end with semi-colon

  • 4. 
    Answer the output of the following program.
    • A. 

      Else cannot end with semi-colon

    • B. 

      Error

    • C. 

      3  5

    • D. 

      3

  • 5. 
    Answer the output of the following program.
    • A. 

      X and y are not equal

    • B. 

      X and y are equal 

    • C. 

      Error: cannot compare two different data types

    • D. 

      Invalid comparison operator used in If condition

  • 6. 
    Answer the output of the following program.
    • A. 

      X=3 y=10 z=0 

    • B. 

      X=10 y=10 z=10 

    • C. 

      X=3 y=10 z=3 

    • D. 

      X=10 y=10 z=0 

  • 7. 
    Answer the output of the following program.
    • A. 

      35 50 0

    • B. 

      0 50 0

    • C. 

      35 35 0

    • D. 

      35 50 35

    • E. 

      CANNOT USE OPERATORS IN PRINTF STATEMENT

  • 8. 
    Answer the output of the following program.
    • A. 

      RATTA MAAR

    • B. 

      LEARN REAL ENGINEERING

    • C. 

      Error in LINE:4

    • D. 

      Error in LINE:5

  • 9. 
    Answer the output of the following program.
    • A. 

      A=15 b=15 c=15

    • B. 

      A=5 b=15 c=5

    • C. 

      A=15 b=15 c=0

    • D. 

      A=15 b=5 c=0

  • 10. 
    Answer the output of the following program.
    • A. 

      NO ERROR

    • B. 

      ERROR AT LINE:3

    • C. 

      ERROR AT LINE:4

    • D. 

      Float cannot be used in if statement

Back to Top Back to top
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.