PRF192_-_FA_2023_-_FE_1018.webp
T

PRF192_-_FA_2023_-_FE_1018.webp

(Choose 1 answer)


Consider the code:
int x[] = {1, 2, 3, 4, 5);
int u;
int *ptr = x;
2222
for(u = 0; u < 5; u++) { printf("%d-", x[u]);
} printf("");
Which one of the following statements could replace the ???? in the code above to cause the
1-2-3-10-5-
to be printed when the code is executed?
A. *ptr + 3 = 10;
B. *ptr[3] = 10;
C. *(ptr + 3) = 10;
D. (*ptr)[3] = 10;
E. *(ptr[3]) = 10;
Exit 5

Thông tin

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

Image metadata

Filename
PRF192_-_FA_2023_-_FE_1018.webp
File size
51.2 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom