Q. What is the output of this code?
Code:#include <stdio.h>
int main() {
int a = 5;
printf("%d", ++a);
return 0;
}
β
Correct Answer: (C)
6
Explanation: ++a is a pre-increment, so a becomes 6 before printing.