In the following program how long will the for loop get executed?
#include <stdio.h>
#include <conio.h>
void main()
{
int i = 5;
for(;scanf("%d", &i); printf("%d", i));
getch();
}
The for loop would not get executed at all
The for loop would get executed only once
The for loop would get executed 5 times
The for loop would get executed infinite times
Hãy suy nghĩ và trả lời câu hỏi trước khi xem đáp án
Tổng hợp câu hỏi trắc nghiệm lập trình C/C++ có đáp án và lời giải đầy đủ nhằm giúp các bạn dễ dàng ôn tập lại toàn bộ các kiến thức.