C Fundamentals MCQs

303 questionsC-ProgramPage 21 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 181easy
What is the difference between the following 2 codes?
#include <stdio.h> //Program 2
int main()
{
    int d, a = 1, b = 2;
    d =  a++ +++b;
    printf("%d %d %d", d, a, b);
}
Question 182easy
What will be the output of the following C code?
#include  <stdio.h>
int main()
{
   signed char chr;
   chr = 128;
   printf("%d\n", chr);
   return 0;
}
Question 183easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int x = 2, y = 0, l;
    int z;
    z = y = 1, l = x && y;
    printf("%d\n", l);
    return 0;
}
Advertisement
Question 184easy
Which of the following statement is false?
Question 185easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int a = 10, b = 10;
    if (a = 5)
    b--;
    printf("%d, %d", a, b--);
}
Question 186easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int i = 23;
    char c = -23;
    if (i < c)
        printf("Yes\n");
    else
        printf("No\n");
}
Advertisement
Question 187easy
Which of the following is true for variable names in C?
Question 188easy
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    int b = 5 & 4 | 6;
    printf("%d", b);
}
Question 189easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    const int p;
    p = 4;
    printf("p is %d", p);
    return 0;
}