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 19



Share with a Friend

Multiple Choice Questions


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

91. Which loop is guaranteed to execute at least one time?
A). for
B). while
C). do while
D). None of these
View Answer
Correct: C




92. What is the output of C Program ?
int main()
{
    int a=25;
    
    while(a <= 27)
    {
        printf("%d ", a);
        a++;
    }

    return 0;
}
A). 25 25 25
B). 25 26 27
C). 27 27 27
D). Compiler error
View Answer
Correct: B




93. if the condition is missing in a for loop?
A). it is assumed to be present and taken to be false
B). it is assumed to be present and taken to the true
C). it results in a syntax error
D). execution will be terminated
View Answer
Correct: B




94. What is the output of C Program ?
int main()
{
    int a=32;
    
    do
    {
        printf("%d ", a);
        a++;
    }while(a <= 30);

    return 0;
}
A). 32
B). 33
C). 30
D). No Output
View Answer
Correct: A




95. What is the output?
 void main()
   {
       while(true)
         {
            printf("Hello");
            break;
         }
   }
A). Hello
B). Hello is printed infinite times
C). Blank
D). Error
View Answer
Correct: D