1) What is the Priority among (*, /, %), (+, -) and (=) C Operators.?
A) (*, /, %) > (+, -) < (=)
B) (*, /, %) < (+, -) < (=)
C) (*, /, %) > (+, -) > (=)
D) (*, /, %) < (+, -)
(+, -) == (=)
C
2) What is the output of the C statement.?
int main()
{
int a=0;
a = 4 + 4/2*5 + 20;
printf("%d", a);
return 0;
}
A) 40B) 4C) 34D) 54
C
3) What is the output of the C Program.?
int main()
{
int a=0;
a = 10 + 5 * 2 * 8 / 2 + 4;
printf("%d", a);
return 0;
}
A) 124B) 54C) 23D) 404
B
4) What is the output of the C Program.?
int main()
{
int a=0;
a = 4 + 5/2*10 + 5;
printf("%d", a);
return 0;
}
A) 29B) 5C) 4D) 34
A
5) What is the output of the C Program.?
int main()
{
int a=0;
a = 10 + 2 * 12 /(3*2) + 5;
printf("%d", a);
return 0;
}
A) 31
B) 19
C) 11
D) 29
B
6) What is the output of the C Program.?
{
int a=0;
a = 10 + 2 * 12 / 3 * 2 + 5;
printf("%d", a);
return 0;
}
A) 19B) 31C) 11D) 25
B
7) What is the output of the C Program..?
int main()
{
float a=10.0;
a = a % 3;
printf("%f", a);
return 0;
}
A) 0B) 1C) 1.000000D) Compiler error.
D
8) What is the output of the C Program.?
int main()
{
float a=10.0;
a = (int)a % 3;
printf("%f", a);
return 0;
}
A) 0B) 1C) 1.000000D) Compiler Error.
C
9) What is the output of the C Program.?
int main()
{
int a=0;
a = (14%-5) - 2;
printf("%d", a);
return 0;
}
A) 0B) -4C) -2D) 2
D
10) What is the output of the C Program.?
int main()
{
int a= 3 + 5/2;
printf("%d", a);
return 0;
}
A) 3B) 2C) 5D) Can not assign an expression to variable at the time of declaration.
C