C Fundamentals MCQs

303 questionsC-ProgramPage 8 of 34

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 64easy
What is the size of an int data type?
Question 65easy
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    int k = 8;
    int m = 7;
    int z = k < m ? k++ : m++;
    printf("%d", z);
}
Question 66easy
Pick the incorrect statement with respect to enums.
Advertisement
Question 67easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int x = 2, y = 0;
    int z;
    z = (y++, y);
    printf("%d\n", z);
    return 0;
}
Question 68easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int x = 1, y = 0;
    x &&= y;
    printf("%d\n", x);
}
Question 69easy
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    int a = 5 * 3 % 6 - 8 + 3;
    printf("%d", a);
}
Advertisement
Question 70easy
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    float x = 0.1;
    if (x == 0.1)
        printf("India");
    else
        printf("Advanced C Classes");
}
Question 71easy
What will be the final value of j in the following C code?
#include <stdio.h>
int main()
{
    int i = 0, j = 0;
    if (i && (j = i + 10))
        //do something
        ;
}
Question 72easy
Will the following C code compile without any error?
#include <stdio.h>
int main()
{
    int k;
    {
        int k;
        for (k = 0; k < 10; k++);
    }
}