Q. What is the value of x after this code runs?
Code:
#include <stdio.h>
int main() {
int x = 5;
x *= 2 + 3;
printf("%d", x);
return 0;
}
β
Correct Answer: (A)
25
Explanation: Expression is evaluated as x *= (2 + 3), i.e., x = 5 * 5 = 25.