C Fundamentals MCQs
Practice free C Fundamentals multiple-choice questions with instant answer feedback and step-by-step solutions. Click an option to check yourself, reveal the full explanation, and work through all 303 questions — no login required.
Question 298easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int x = 1, y = 2;
if (x && y == 1)
printf("true\n");
else
printf("false\n");
}Question 299easy
Which of the following type-casting have chances for wrap around?
Question 300easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int a = 10, b = 5, c = 5;
int d;
d = a == (b + c);
printf("%d", d);
}Advertisement
Question 301easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int i = 3;
int l = i / -2;
int k = i % -2;
printf("%d %d\n", l, k);
return 0;
}Question 302easy
What will happen if the following C code is executed?
#include <stdio.h>
int main()
{
int main = 3;
printf("%d", main);
return 0;
}Question 303easy
What will be the output of the following C code?
#include<stdio.h>
#define MAX 4
enum Shyam
{
a,b=3,c
};
main()
{
if(MAX!=c)
printtf("hello");
else
printf("welcome");
}