C Fundamentals MCQs

303 questionsC-ProgramPage 16 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 136easy
Which of the following is not a valid variable name declaration?
Question 137easy
What will be the final value of d in the following C code?
#include <stdio.h>
int main()
{
    int a = 10, b = 5, c = 5;
    int d;
    d = b + c == a;
    printf("%d", d);
}
Question 138easy
What will be the output of the following C code?
#include <stdio.h>
 int main()
 {
     int i = -5;
     i = i / 3;
     printf("%d\n", i);
     return 0;
 }
Advertisement
Question 139easy
Which of the following option is the correct representation of the following C statement?
e = a * b + c / d * f;
Question 140easy
Point out the error( if any) in the following code.
#include<stdio.h>
enum India
{
    a,b,c
};
enum India g;
main()
{
    g++;
    printf("%d",g);
}
Question 141easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int i = 1;
    if (i++ && (i == 1))
        printf("Yes\n");
    else
        printf("No\n");
}
Advertisement
Question 142easy
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    int a = -5;
    int k = (a++, ++a);
    printf("%d\n", k);
}
Question 143easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int i = 0;
    int j = i++ + i;
    printf("%d\n", j);
}
Question 144easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int var = 010;
    printf("%d", var);
}