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 109easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int x = 1, y = 2;
int z = x & y == 2;
printf("%d\n", z);
}Question 110easy
A variable declared in a function can be used in main().
Question 111easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int x = 3, y = 2;
int z = x /= y %= 2;
printf("%d\n", z);
}Advertisement
Question 112easy
What will be the output of the following C code considering the size of a short int is 2, char is 1 and int is 4 bytes?
#include <stdio.h>
int main()
{
short int i = 20;
char c = 97;
printf("%d, %d, %d\n", sizeof(i), sizeof(c), sizeof(c + i));
return 0;
}Question 113easy
What will be the output of the following C code?
#include <stdio.h>
void main()
{
int x = 97;
int y = sizeof(x++);
printf("X is %d", x);
}Question 114easy
What will be the output of the following C code?
#include <stdio.h>
void main()
{
int a = 2 + 4 + 3 * 5 / 3 - 5;
printf("%d", a);
}Advertisement
Question 115easy
A user defined data type, which is used to assign names to integral constants is called . . . . . . . .
Question 116easy
What will be the output of the following C code if input given is 2?
#include<stdio.h>
enum day
{
a,b,c=5,d,e
};
main()
{
printf("Enter the value for a");
scanf("%d",a);
printf("%d",a);
}Question 117easy
What will be the output of the following C code?
#include <stdio.h>
void main()
{
int b = 6;
int c = 7;
int a = ++b + c--;
printf("%d", a);
}