C Programming MCQs - Precedence And Order Of Evaluation
This section focuses on the "Precedence And Order Of Evaluation" in C programming. These Multiple Choice Questions (MCQ) should be practiced to improve the C programming skills required for various interviews (campus interview, walk-in interview, company interview), placement, entrance exam and other competitive examinations.
1. In expression i = g() + f(), first function called depends on __________
View Answer
2. Which of the following is correct Associativity for == operator?
View Answer
3. Which of the following operator has highest Precedence?
View Answer
4. Which of the following operator has lowest Precedence?
View Answer
5. Which of the following is a ternary operator?
View Answer
6. What will be output for the following code?
#include <stdio.h>
int main()
{
int a = 1, b = 2;
int c = a ^ b & 1;
printf(""%d
"", c);
}
View Answer
7. What will be output for the following code?
#include <stdio.h>
int main()
{
double a = 5 % 3 & 4 + 5 * 6;
printf(""%lf"", a);
}
View Answer
8. What will be output for the following code?
#include <stdio.h>
int main()
{
int a = 2;
int b = (a++, a++);
printf(""%d%d
"", b, a);
}
View Answer
9. Which of the following has same Precedence?
A. ++
B. ->
C. !
View Answer
10. Which of the following option is the correct representation of the following C statement?
e = a * b + c / d * f;
View Answer
Discussion