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 25



Share with a Friend

Multiple Choice Questions


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

121. What is the output of C Program ?
int main()
{
    int a=0, b=0;
    while(++a < 4)
        printf("%d ", a);

    while(b++ < 4)
        printf("%d ", b);

    return 0;
}
A). 0 1 2 3 1 2 3 4
B). 1 2 3 1 2 3 4
C). 1 2 3 4 1 2 3 4
D). 1 2 3 4 0 1 2 3
View Answer
Correct: B




122. What is the output of C Program ?
int main()
{
    int a=10,b=20;
    
    if(a==9 AND b==20)
    {
        printf("Hurray..");
    }

    if(a==10 OR b==21)
    {
        printf("Theatre");
    }

    return 0;
}
A). Theatre
B). Hurray Theatre
C). No output
D). Compiler error
View Answer
Correct: D




123. What are C ASCII character ranges ?

A). A to Z = 65 to 91
B). a to z = 97 to 122
C). 0 to 9 = 48 to 57
D). All the above
View Answer
Correct: D




124. Expand or Abbreviate ASCII with regard to C Language.

A). Australian Standard Code for Information Interchange
B). American Standard Code for Information Interchange
C). American Symbolic Code for Information Interchange
D). Australian Symbolic Code for Information Interchange
View Answer
Correct: B




125. What is the output of C Program with Switch Statement ?
int main()
{
  
    int a=5;

    switch(a)
    {
        case 0: printf("0 ");
        case 3: printf("3 ");
        case 5: printf("5 ");
        default: printf("RABBIT ");
    }

    a=10;
    switch(a)
    {
        case 0: printf("0 ");
        case 3: printf("3 ");
        case 5: printf("5 ");
        default: printf("RABBIT "); break;
    }

    return 0;
}
A). 5 RABBIT
B). 0 3 5 RABBIT 0 3 5 RABBIT
C). 0 3 5 RABBIT RABBIT
D). 3 5 RABBIT RABBIT
View Answer
Correct: D