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 14 of 32

Explore more Topics under C Programming

Q131.
Determine Output:
void main()
{
      int i=0;
      for(;i++;printf("%d", i));
      printf("%d", i);
}
Discuss
Answer: (a).1
Q132.
Determine Output:
void main()
{
      int i=0, j=0;
      if(i && j++)
            printf("%d..%d", i++, j);
      printf("%d..%d", i, j);
}
Discuss
Answer: (c).0..0
Q133.
Determine Output:
void main()
{
      static int i=5;
      if(--i){
            main();
            printf("%d ", i);
      }
}
Discuss
Answer: (b).0 0 0 0
Q134.
Determine Output:
void main()
{
      int i=-1, j=-1, k=0, l=2, m;
      m = i++ && j++ && k++ || l++;
      printf("%d %d %d %d %d", i, j, k, l, m);
}
Discuss
Answer: (c).0 0 1 3 1
Q135.
Determine Output:
void main()
{
      int i = -1;
      +i;
      printf("i = %d, +i = %d", i, +i);
}
Discuss
Answer: (c).i = -1, +i = -1
Q136.
Determine Output:
void main()
{
      char *str1 = "abcd";
      char str2[] = "abcd";
      printf("%d %d %d", sizeof(str1), sizeof(str2), sizeof("abcd"));
}
Discuss
Answer: (a).2 5 5
Q137.
Determine Output:
void main()
{
      int i;
      char a[]="๏ฟฝ"; 
      if(printf("%sn", a))
            printf("Ok here n");
      else
            printf("Forget itn");
}
Discuss
Answer: (a).Ok here
Q138.
In the following program how long will the for loop get executed?
#include<stdio.h>
int main()
{
    int i=5;
    for(;scanf("%s", &i); printf("%d\n", i));
    return 0;
}
Discuss
Answer: (d).The for loop would get executed infinite times
Q139.
What will be the output of the program?
#include<stdio.h>
int main()
{
    int X=40;
    {
        int X=20;
        printf("%d ", X);
    }
    printf("%d\n", X);
    return 0;
}
Discuss
Answer: (b).20 40
Q140.
How many times "CompSciBits" is get printed?
#include<stdio.h>
int main()
{
    int x;
    for(x=-1; x<=10; x++)
    {
        if(x < 5)
            continue;
        else
            break;
        printf("CompSciBits");
    }
    return 0;
}
Discuss
Answer: (c).0 times

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!