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 262easy
What will be the output of the following C code?
main()
{
enum resut {pass, fail};
enum result s1,s2;
s1=pass;
s2=fail;
printf("%d",s1);
}Question 263easy
What will be the output of the following C code snippet?
#include <stdio.h>
void main()
{
unsigned int x = -5;
printf("%d", x);
}Question 264easy
What will be the output of the following C code?
#include <stdio.h>
void main()
{
int a = 5 * 3 + 2 - 4;
printf("%d", a);
}Advertisement
Question 265easy
All keywords in C are in . . . . . . . .
Question 266easy
What will be the output of the following C code?
#include <stdio.h>
void main()
{
int k = 4;
int *const p = &k
int r = 3;
p = &r
printf("%d", p);
}Question 267easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int c = 2 ^ 3;
printf("%d\n", c);
}Advertisement
Question 268easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int x = 1;
int y = x == 1 ? getchar(): 2;
printf("%d\n", y);
}Question 269easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int y = 0;
if (1 |(y = 1))
printf("y is %d\n", y);
else
printf("%d\n", y);
}Question 270easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int y = 1;
if (y & (y = 2))
printf("true %d\n", y);
else
printf("false %d\n", y);
}