C Programming Multiple Choice Questions (MCQ) | IT Developer <?php echo $page_title; ?>
IT Developer

C Programming Multiple Choice Questions (MCQ)

C Programming - Conditional Statements & Loops Multiple Choice Questions (MCQ) - Set 20



Share with a Friend

Multiple Choice Questions


C Programming - Conditional Statements & Loops Multiple Choice Questions (MCQ) - Set 20

96. What is the output of C Program ?
int main()
{
    int a=32;
    
    do
    {
        printf("%d ", a);
        a++;
        if(a > 35)
            break;
    }while(1);

    return 0;
}
A). No Output
B). 32 33 34
C). 32 33 34 35
D). Compiler error
View Answer
Correct: C




97. What is the output?
  void main()
   {
      int a = 5;
      while ( a = 10 )
       {
         printf ("Hello\n");
         break;
       }
       printf("India");
   }
A). India

B). Hello
      India

C). Hello is printed infinite times

D). Error
View Answer
Correct: B




98. Choose a correct C Statement.
A). a++ is (a=a+1) POST INCREMENT Operator
B). a-- is (a=a-1) POST DECREMENT Operator --a is (a=a-1) PRE DECREMENT Opeator
C). ++a is (a=a+1) PRE INCRMENT Operator
D). All the above.
View Answer
Correct: D




99. What is the output?
  void main()
    {
        int a=25;
        while(a <= 27)
         {
            printf("%d ", a);
            a++;
         }
     }
A). 25 25 25
B). 25 26 27
C). 27 27 27
D). Error
View Answer
Correct: B




100. Choose correct Syntax for C Arithmetic Compound Assignment Operators.
A). a += b is (a = a + b) a -= b is (a = a - b)
B). a *= b is (a = a * b) a /= b is (a = a / b)
C). a %= b is (a = a % b)
D). All the above.
View Answer
Correct: D