C/C MCQ Quiz Hub

C MCQS:-The ABC of C

Choose a topic to test your knowledge and improve your C/C skills

Point out which of the following variables names are valid:





✅ Correct Answer: 1

C variables are case





✅ Correct Answer: 2

Binary equivalent of 762 is :-





✅ Correct Answer: 3

Octal equivalent of 762 is:-





✅ Correct Answer: 1

A character variable can at a time store _ character(s):-





✅ Correct Answer: 4

int a,b=6; a=++b + b++; value of a ?





✅ Correct Answer: 1

What will be the output of the following programs:- #include<stdio.h> int main() { printf("%d,%o,%x",72,72,72); }





✅ Correct Answer: 1

What will be the output of the following programs:- #include<stdio.h> int main() { char ch; printf("%d",sizeof(ch)); }





✅ Correct Answer: 3

What will be the output of the following programs:- #include<stdio.h> int main() { int i; printf("%d",sizeof(i)); }





✅ Correct Answer: 4

What will be the output of the following programs:- #include<stdio.h> int main() { float f; printf("%d",sizeof(f)); }





✅ Correct Answer: 3

What will be the output of the following programs:- #include<stdio.h> int main() { printf("%d",sizeof(char)); printf("%d",sizeof(int)); printf("%d",sizeof(float)); }





✅ Correct Answer: 2

What will be the output of the following programs:- #include<stdio.h> int main() { printf("%d",sizeof(2)); }





✅ Correct Answer: 3

What will be the output of the following programs:- #include<stdio.h> int main() { printf("%d",sizeof(2.0)); }





✅ Correct Answer: 1

What will be the output of the following programs:- #include<stdio.h> int main() { float f=2.0; printf("%d,%d",sizeof(f),sizeof(2.0)); }





✅ Correct Answer: 2

What will be the output of the following programs:- #include<stdio.h> int main() { char ch=291; printf("%d,%c",ch,ch); }





✅ Correct Answer: 3

What will be the output of the following program: #include<stdio.h> int main() { int a,b; a=-3- -3; b=-3- -(-3); printf("%d,%d",a,b); }





✅ Correct Answer: 4

What will be the output of the following program: #include<stdio.h> int main() { int a; a=3*4%5; printf("%d",a); }





✅ Correct Answer: 2

What will be the output of the following program:#include<stdio.h>int main(){int a;a=3+4-7*8/5%10;printf(





✅ Correct Answer: 1

What will be the output of the following program: #include<stdio.h> int main() { int a; a=-3+4-7*8/5%10; printf("%d",a); }





✅ Correct Answer: 4

What will be the output of the following program: #include<stdio.h> int main() { int a; a=4%5+6%5; printf("%d",a); return 0; }





✅ Correct Answer: 2

What will be the output of the following program: #include<stdio.h> int main() { int a; a=-3*-4%-6/-5; printf("%d",a); return 0; }





✅ Correct Answer: 1

What will be the output of the following program: #include<stdio.h> int main() { printf("%d,",4/3); printf("%d,",4/-3); printf("%d,",-4/3); printf("%d",-4/-3); return 0; }





✅ Correct Answer: 3

What will be the output of the following program: #include<stdio.h> int main() { printf("%d,",4%3); printf("%d,",4%-3); printf("%d,",-4%3); printf("%d",-4%-3); return 0; }





✅ Correct Answer: 2

What will be the output of the following program: int main() { float a=5,b=2; int c; c=a%b; printf("%d",c); return 0; }





✅ Correct Answer: 3

What will be the output of the following program: int main() { int c; c= 3 ** 4 - 7 ^ 8; printf("%d",c); return 0; }





✅ Correct Answer: 1

What will be the output of the following program: int main() { float a=5.b=2; int c; c=300000*300000/300000; printf("%d",c); return 0; }





✅ Correct Answer: 3

What will be the output of the following program:- int main() { float a=1.5; int b=3; a=b/2+b*8/b-b+a/3; printf("%d",a); return 0; }





✅ Correct Answer: 3

What will be the output of the following program:- int main() { int i=3,a=4,n; float t=4.2; n=a * a / i + i / 2 * t + 2 +t; printf("%d",n) return 0; }





✅ Correct Answer: 1

What will be the output of the following program:- int main() { int a,b; a=5.999999; b=5.000001; printf("%d,%d",a,b); return 0; }





✅ Correct Answer: 2

What will be the output of the following program:- int main() { float a; a=4/2; printf("%f,%f",a,4/2); return 0; }





✅ Correct Answer: 4

What will be the output of the following program:- int main() { printf("%d,%f",4,4); return 0; }





✅ Correct Answer: 3

What will be the output of the following program:- int main() { printf("%d,%f",4.0,4.0); return 0; }





✅ Correct Answer: 3

What will be the output of the following program:- int main() { printf("%d",sizeof(4)/sizeof(2.0)); return 0; }





✅ Correct Answer: 2

What will be the output of the following program:- int main() { printf("%d",sizeof(4.0)/sizeof(4)); return 0; }





✅ Correct Answer: 3

What will be the output of the following program,consider 10 as a input:- int main() { scanf("%d",&n); printf("%d",n); return 0; }





✅ Correct Answer: 3

What will be the output of the following program:- int main() { int a=5,x; x=++a + a++ - ++a; printf("%d",a); return 0; }





✅ Correct Answer: 3

What will be the output of the following program:- int main() { int a=5,x; x=++a + a++ - ++a; x++; a=a + ++x; printf("%d",a); return 0; }





✅ Correct Answer: 1

What will be the output of the following program:- int main() { int a=5,x; x=++a + a++ + ++a; printf("%d,%d",x,a);}





✅ Correct Answer: 4

What will be the output of the following program:- int main() { int a=5,x; x=++a * a++; printf("%d,%d",x,a); return 0; }





✅ Correct Answer: 1

Binary representation of 345 is :-





✅ Correct Answer: 4

Decimal representation of 101011001 is :-





✅ Correct Answer: 4

Decimal representation of 101010001 is :-





✅ Correct Answer: 3

Decimal representation of 110011001 is :-





✅ Correct Answer: 2

Decimal representation of 11111001 is :-





✅ Correct Answer: 1

Decimal representation of 11111111 is :-





✅ Correct Answer: 3

Octal representation of 11111001 is :-





✅ Correct Answer: 2

Hexadecimal representation of 11111001 is :-





✅ Correct Answer: 3

Binary representation of F9 is :-





✅ Correct Answer: 1

Binary representation of 371(octal) is :-





✅ Correct Answer: 1