OD
(Choose 1 answer)
main() { int x = 5;
What would happen if the user types in number 3 and presses Enter when running this program?
char c;
printf("Enter x = ");
scanf("%d", &x);
printf("Calculate square? (Y/N): ");
c = getchar();
if (c == 'Y' || c == 'y')
printf("sqr = %d", x*x);
}
A. sqr = 9
B. sqr = 25
C. The program exits without printing the square
D. It depends on whether the user enters 'Y' or not, being asked "calculate square?"
Exit 14