C Fundamentals MCQs

303 questionsC-ProgramPage 12 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 100easy
What is the size of myArray in the code shown below? (Assume that 1 character occupies 1 byte)
typedef char x[10];
x myArray[5];
Question 101easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    printf("examveda\r\nclass\n");
    return 0;
}
Question 102easy
What will be the output of the following C code?
#include<stdio.h>
main()
{
    typedef int a;
    a b=2, c=8, d;
    d=(b*2)/2+8;
    printf("%d",d);
}
Advertisement
Question 103easy
Which of the following cannot be a variable name in C?
Question 104easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int i = -3;
    int k = i % 2;
    printf("%d\n", k);
}
Question 105easy
What will be the output of the following C code?
#include <stdio.h>
void main()
{
   int a = 5, b = -7, c = 0, d;
   d = ++a && ++b || ++c;
   printf("\n%d%d%d%d", a,  b, c, d);
}
Advertisement
Question 106easy
Which type of conversion is NOT accepted?
Question 107easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int x = 2, y = 0;
    int z = (y++) ? y == 1 && x : 0;
    printf("%d\n", z);
    return 0;
}
Question 108easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int a = 10;
    double b = 5.6;
    int c;
    c = a + b;
    printf("%d", c);
}
C Fundamentals MCQs with Answers & Solutions — C-Program | GrabStudy