PRF192_-_REB5_-_FA_2023_1327.webp
Naoya92

PRF192_-_REB5_-_FA_2023_1327.webp

  • Media owner Naoya92
  • Ngày thêm
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

Thông tin

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

Image metadata

Filename
PRF192_-_REB5_-_FA_2023_1327.webp
File size
53.4 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom