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 7



Share with a Friend

Multiple Choice Questions


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

31. The continue statement cannot be used with
A). for
B). while
C). do while
D). switch
View Answer
Correct: D




32. What is the output of C Program ?
int main()
{
    if( 10 > 9 )
        printf("Hongkong\n");
    else if(4%2 == 0)
        printf("France\n");
        printf("Russia");
    return 0;
}
A). Hongkong
B). Hongkong Russia
C). Hongkong France Russia
D). France Russia
View Answer
Correct: B




33. do-while loop terminates when conditional expression returns?
A). One
B). Zero
C). Non - zero
D). None of these
View Answer
Correct: B




34. What is the output of the C Program ?
int main()
{
    if(-5)
    {
        printf("France\n");
    }
    if(5)
    {
        printf("Chicago\n");
    }
    printf("Ping");

    return 0;
}
A). Ping
B). Chicago Ping
C). France Chicago Ping
D). Compiler error as a number can not be put as condition inside IF.
View Answer
Correct: C




35. Loops in C Language are implemented using?
A). while Block
B). for Block
C). do while Block
D). All of these
View Answer
Correct: D