PRF192_-_SP_2024_-_RE_1724.webp
true_love

PRF192_-_SP_2024_-_RE_1724.webp

Qmark: 1
Total Marks: 50
Vol: 8
Font: Microsoft Sans Serif
Size: 10
Time Left:43:14
Multiple Choices
}
(Choose 1 answer)
What would happen if the user types in number 3 and presses Enter when running this program?
main() {
int x = 5;
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?"

Thông tin

Category
PRF192
Thêm bởi
true_love
Ngày thêm
Lượt xem
1,650
Lượt bình luận
11
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
PRF192_-_SP_2024_-_RE_1724.webp
File size
223.4 KB
Dimensions
1834px x 882px

Share this media

Back
Bên trên Bottom