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 226easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int x = 2, y = 0;
int z = (y++) ? 2 : y == 1 && x;
printf("%d\n", z);
return 0;
}Question 227easy
What will be the output of the following C code?
#include <stdio.h>
void main()
{
char a = 'a';
int x = (a % 10)++;
printf("%d\n", x);
}Question 228easy
What will be the output of the following C code?
#include <stdio.h>
void main()
{
1 < 2 ? return 1 : return 2;
}Advertisement
Question 229easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int x = 3; //, y = 2;
const int *p = &x
*p++;
printf("%d\n", *p);
}Question 230easy
What will be the output of the following C code?
#include <stdio.h>
void main()
{
int a = 2 + 3 - 4 + 8 - 5 % 4;
printf("%d\n", a);
}Question 231easy
C99 standard guarantees uniqueness of . . . . . . . . characters for internal names.
Advertisement
Question 232easy
What will be the output of the following C code?
#include <stdio.h>
void main()
{
int k = 0;
double b = k++ + ++k + k--;
printf("%d", k);
}Question 233easy
What will be the output of the following C code?
#include <stdio.h>
void main()
{
int k = 8;
int m = 7;
k < m ? k = k + 1 : m = m + 1;
printf("%d", k);
}Question 234easy
Which of the following is not a valid variable name declaration?