PRF192_-_FEB5_-_FA_2023_1298.webp
G

PRF192_-_FEB5_-_FA_2023_1298.webp

(Choose 1 answer)
What is the output when the sample code below is executed?
main(){
int a[5] = {1, 2, 3, 4, 5};
int i, sum = 0;
for (i = 0; i < 5; i++) {
if(i==2)break:
sum += a[i];
} printf("%d", sum);
}
A. 3
B. 15
C. 12
D. 1

Exit 3

Thông tin

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

Image metadata

Filename
PRF192_-_FEB5_-_FA_2023_1298.webp
File size
45.2 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom