adplus-dvertising

Welcome to the C Programming Fundamentals MCQs Page

Dive deep into the fascinating world of C Programming Fundamentals with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of C Programming Fundamentals, a crucial aspect of C Programming. In this section, you will encounter a diverse range of MCQs that cover various aspects of C Programming Fundamentals, 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 C Programming Fundamentals. 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 C Programming Fundamentals. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

C Programming Fundamentals MCQs | Page 5 of 24

Explore more Topics under C Programming

Q41.
How many times below for loop will be executed ?
#include<stdio.h>
int main()
{
    int i=0;
    for(;;)
        printf("%d",i);
    return 0;
}
Discuss
Answer: (b).Infinite times
Q42.
Find output of the following program ?
#include<stdio.h>
int main()
{
    char str[] = "Smaller";
    int a = 100;
    printf(a > 10 ? "Greater" : "%s", str);
    return 0;
}
Discuss
Answer: (a).Greater
Q43.
Guess the output of the following program ?
#include<stdio.h>
int main()
{
    int a = 100, b = 200, c = 300;
    if(!a >= 500)
        b = 300;
    c = 400;
    printf("%d,%d,%d",a, b, c);
    return 0;
}
Discuss
Answer: (b).100,200,400
Q44.
Guess the output of the following program :
#include<stdio.h>
int main()
{
    int x = 10;
    float y = 10.0;
    if(x == y)
        printf("x and y are equal");
    else
        printf("x and y are not equal");
    return 0;
}
Discuss
Answer: (a).x and y are equal
Q45.
Guess the output of the program ?
#include<stdio.h>
int main()
{
    int a=0, b=1, c=2;
    *((a+1 == 1) ? &b : &a) = a ? b : c;
    printf("%d, %d, %d\n", a, b, c);
    return 0;
}
Discuss
Answer: (c).0, 2, 2
Q46.
What will be printed if we execute following program ?
#include<stdio.h>
int main()
{
    float a = 0.3;
    if(0.3 > a)
        printf("True\n");
    else
        printf("False\n");
    return 0;
}
Discuss
Answer: (a).False
Q47.
Predict the output of the program ?
#include<stdio.h>
int main()
{
    if(printf("ABC"))
        printf("True");
    else
        printf("False");
    return 0;
}
Discuss
Answer: (d).ABCTrue
Q48.
Guess the output of the program ?
#include<stdio.h>
int main()
{
    int i = 1, j = 2;
    if(i = 1) && if(j = 2)
        printf("India is my country");
    return 0;
}
Discuss
Answer: (b).Error: Misplaced If
Q49.
How many times loop will get executed ?
#include<stdio.h>
int main()
{
    int i = 0;
    while(i <= 255)
    {
        printf("%d", i);
        i++;
    }
    return 0;
}
Discuss
Answer: (d).256 Times
Q50.
Point out error in the following code -
#include<stdio.h>
int main()
{
    int x = 50, y = 100;
    if(x = = y)
        printf("x is equal to y\n");

    else if(x > y)
        printf("x is greater than y\n");

    else if(x < y)
        printf("x is less than y\n")l
    return 0;
}
Discuss
Answer: (c).Error: L-Value Required

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!