c-programming-mcqs - Set (6)

Correct Answer: Orange && Worng Answer: Red

1. Which of the following is not an example of Looping statement ?

  • (A). For
  • (B). Do-while
  • (C). While
  • (D). Switch
  • View Answer

    Explanation: Not Avilable

    2. Which of the statement we need to write in order to check any condition ?

  • (A). If
  • (B). Break
  • (C). Continue
  • (D). Exit
  • View Answer

    Explanation: Not Avilable

    3. The ______ statement causes the loop to be terminated.

  • (A). Exit
  • (B). Break
  • (C). Default
  • (D). Continue
  • View Answer

    Explanation: In C programming break statement is terminate the loop immediately when it is encountered.

    4. Which among the following is a unconditional control structure ?

  • (A). Do-while
  • (B). If-else
  • (C). Goto
  • (D). For
  • View Answer

    Explanation: Not Avilable

    5. Which is syntax of for loop?

  • (A). for(intialization; condition; increment/decrement)
  • (B). for(increment; expression; condition)
  • (C). for(condition; expression; statement)
  • (D). for(expression; condition; statement)
  • View Answer

    Explanation: Not Avilable

    6. A do-while loop is useful when we want that the statement within the loop must be executed :

  • (A). Only once
  • (B). At least once
  • (C). More than once
  • (D). None of the above
  • View Answer

    Explanation: Not Avilable

    7. In what sequence tha initialization, testing and execution of body is done in a do-while loop ?

  • (A). Initialization, execution of body, testing
  • (B). Execution of body, initialization, testing
  • (C). Initialization, testing, execution of body
  • (D). None of the above
  • View Answer

    Explanation: Not Avilable

    8. Which of the following statement is used to take the control to the beginning of the loop ?

  • (A). Exit
  • (B). Continue
  • (C). Break
  • (D). None of the above
  • View Answer

    Explanation: Not Avilable

    9. What is the work of break keyword?

  • (A). Halt execution of program
  • (B). Restart execution of program
  • (C). Exit from loop or switch statement
  • (D). None of the above
  • View Answer

    Explanation: Not Avilable

    10. A preprocessor directive is :

  • (A). A message from compiler to the programmer
  • (B). A message from compiler to the linker
  • (C). A message from programmer to the preprocessor
  • (D). A message from programmer to the microprocessor
  • View Answer

    Explanation: Not Avilable

    11. Which of the following is not a keyword in C language ?

  • (A). Getchar
  • (B). Int
  • (C). Void
  • (D). Volatile
  • View Answer

    Explanation: Not Avilable

    12. ASCII value of ‘A’ is :

  • (A). 65
  • (B). 32
  • (C). 97
  • (D). 48
  • View Answer

    Explanation: Not Avilable

    13. Struct time {int hours; int minutes; int seconds;}t; Struct time *pt; pt=&t with reference to the above declarations, which of the following refers to seconds correctly

  • (A). Pt.seconds
  • (B). Pt->seconds
  • (C). time.seconds
  • (D). time->seconds
  • View Answer

    Explanation: Not Avilable

    14. An expression contains relational operators, assignment operators and arithmetic operators and arithmetic operators. In the absence of parenthesis, the will be evaluated in which of the following order.

  • (A). Assignment, relational, arithmetic
  • (B). Arithmetic, relational, assignment
  • (C). Relational, arithmetic, assignment
  • (D). Assignment, arithmetic, relational
  • View Answer

    Explanation: Not Avilable

    15. Hierachy decides which operator

  • (A). is most important
  • (B). is used first
  • (C). is fastest
  • (D). operates on largest numbers
  • View Answer

    Explanation: Not Avilable