adplus-dvertising

Welcome to the Control Flow Statements in C MCQs Page

Dive deep into the fascinating world of Control Flow Statements in C with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of Control Flow Statements in C, a crucial aspect of C Programming. In this section, you will encounter a diverse range of MCQs that cover various aspects of Control Flow Statements in C, from the basic principles to advanced topics. Each question is thoughtfully crafted to challenge your knowledge and deepen your understanding of this critical subcategory within C Programming.

frame-decoration

Check out the MCQs below to embark on an enriching journey through Control Flow Statements in C. Test your knowledge, expand your horizons, and solidify your grasp on this vital area of C Programming.

Note: Each MCQ comes with multiple answer choices. Select the most appropriate option and test your understanding of Control Flow Statements in C. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

Control Flow Statements in C MCQs | Page 23 of 32

Q221.
The following program fragment
int x[5][5],  i, j;
 for (i = 0; i < 5, ++i;)
 for(j = 0; j < 5 ; j++)
 x[ i ] [ j ] = x[ j ][ i ];
Discuss
Answer: (b).makes the given matrix x, symmetric
Q222.
Consider the following program segment. On termination j will have the value

i = 6720;
 j = 4;
 while (( i % j ) == 0) 
 {
        i = i / j ;
        j = j + 1;
 }
Discuss
Answer: (c).9
Q223.
The output of the following program is
main()
 {
 static int x[ ] = { 1, 2, 3, 4, 5, 6, 7, 8 };
    int i;
 for (i = 2; i < 6; ++i )
 x[ x[ i ] ] = x[ i ];
 for( i =0; i < 8; ++i)
 printf("%d", x[ i]);
 }
Discuss
Answer: (a).1 2 3 3 5 5 7 8
Q224.
Consider the following program and Choose the correct statement.s
main( )
 {
  int x = 2, y = 5;
    if (x < y)
    return ( x = x + y);
    else printf ("z1");
    printf ("z2");
 }
Discuss
Answer: (d).none of above
Q225.
The for loop
 for( i=0; i<10; ++i)
 printf("%d", i & 1);
prints
Discuss
Answer: (a).0101010101
Q226.
Consider the program fragment. If i >= 2, then the value of j, will be printed only if

j = 2;
 while ((i % j) ! = 0)
 j = j + 1;
 if (j < i) printf ("%d", j);
Discuss
Answer: (d).i is nor prime
Q227.
Consider the following program fragment. The output will be
d = 0;
 for(i = 1; i < 31; ++i)
    for(j = 1; j < 31; ++j)
        for(k = 1; k < 31; ++k)
            if(((i + j + k) % 3)  == 0)
                  d = d + 1;
 printf("%d", d );
Discuss
Answer: (a).9030
Q228.
In the following loop construct, which one is executed only once always.

for(exp1; exp2; exp3)
Discuss
Answer: (a).exp1
Q229.
The continue statment cannot be used with
Discuss
Answer: (d).switch
Q230.
goto can be used to jump from main to within a function?
Discuss
Answer: (b).False

Suggested Topics

Are you eager to expand your knowledge beyond C Programming? We've curated a selection of related categories that you might find intriguing.

Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!