ExamTray App is now Available on Google Play

 

TOTAL QS = 20Time [ 00 : 00 : 00 ]
00:00:00

C Programming Basics Tutorial - Loops FOR While Do While - Online Test 1

Instructions

Total Questions: 20

Total Minutes: 20

This ExamTray Free Online Exam tests your C Programming Skills on C Loops or Iterations with FOR, WHILE and DO WHILE Syntax. Know about continue and break statements. Exam displays Questions and Answers after finishing. Easily Attend Competitive Exams and Job Interview Questions.

All the Best

1) Choose a right C Statement.
2) Loops in C Language are implemented using.?
3) Which loop is faster in C Language, for, while or Do While.?
4) Choose correct C while loop syntax.
5) Choose a correct C for loop syntax.
6) Choose a correct C do while syntax.
7) What is the output of C Program.?
int main()
{
    while(true)    
    {
        printf("RABBIT");
        break;
    }
    
    return 0;
}
8) What is the output of C Program.?
int main()
{
    int a=5;
    
    while(a==5)    
    {
        printf("RABBIT");
        break;
    }

    return 0;
}
9) What is the output of C Program.?
int main()
{
    int a=5;
    
    while(a=123)    
    {
        printf("RABBIT\n");
        break;
    }
    printf("GREEN");
    
    return 0;
}
10) What is the output of C Program.?
int main()
{
    int a=5;
    
    while(a >= 3);
    {
        printf("RABBIT\n");
        break;
    }
    printf("GREEN");
    
    return 0;
}
11) What is the output of C Program.?
int main()
{
    int a=25;
    
    while(a <= 27)
    {
        printf("%d ", a);
        a++;
    }

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

    return 0;
}
13) 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;
}
14) Choose a correct C Statement.
15) Choose correct Syntax for C Arithmetic Compound Assignment Operators.
16) What is the output of C Program.?
int main()
{
    int k, j;
    
    for(k=1, j=10; k <= 5; k++)
    {
        printf("%d ", (k+j));
    }

    return 0;
}
17) What is the output of C Program.?
int main()
{
    int k;
    
    for(k=1; k <= 5; k++);
    {
        printf("%d ", k);
    }

    return 0;
}
18) What is the output of C Program.?
int main()
{
    int k;
    
    for(;;)
    {
        printf("TESTING\n");
        break;
    }

    return 0;
}
19) What is the output of C Program.?
int main()
{
    int k;
    
    for(printf("FLOWER "); printf("YELLOW "); printf("FRUITS "))
    {
        break;
    }

    return 0;
}
20) What is the way to suddenly come out of or Quit any Loop in C Language.?