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 235easy
What will be the output of the following C code?
#include <stdio.h>
void main()
{
int a = 3;
int b = ++a + a++ + --a;
printf("Value of b is %d", b);
}Question 236easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int i = 0;
int x = i++, y = ++i;
printf("%d % d\n", x, y);
return 0;
}Question 237easy
Which is valid C expression?
Advertisement
Question 238easy
What will be the output of the following C code?
#include<stdio.h>
int main()
{
int a = 1, b = 2, c = 3, d = 4, e;
e = c + d = b * a;
printf("%d, %d\n", e, d);
}Question 239easy
While swapping 2 numbers what precautions to be taken care?
b = (b / a);
a = a * b;
b = a / b;Question 240easy
What is the problem in the following variable declaration?
float 3Bedroom-Hall-Kitchen?;Advertisement
Question 241easy
Comment on the following statement.
n = 1;
printf("%d, %dn", 3*n, n++);Question 242easy
Which of the following format identifier can never be used for the variable var?
#include <stdio.h>
int main()
{
char *var = "The quick brown fox jumps over the lazy dog";
}Question 243easy
What will be the output of the following C code?
#include <stdio.h>
void main()
{
int x = 1, z = 3;
int y = x << 3;
printf(" %d\n", y);
}