쉽게 풀어쓴 C언어 연습문제3
- 최초 등록일
- 2020.10.16
- 최종 저작일
- 2018.03
- 13페이지/ 한컴오피스
- 가격 2,000원
소개글
"쉽게 풀어쓴 C언어 연습문제3"에 대한 내용입니다.
목차
없음
본문내용
3. 다음의 프로그램을 실행시키면 “Hello World!”는 몇 번이나 출력되는가?
#include<stdio.h>
int main()
{
int x;
for(x=0; x<10; x++)
{
if(x < 5)
continue;
else
break;
printf(“Hello World!”);
}
return 0;
}
5번
4. 다음의 프로그램에서 생성되는 출력 결과는 무엇인가?
(a)
int i = 0;
while( i < 10 )
{
printf(“%d\n”, i);
i += 3;
}
0
3
6
9
(b)
int i = 0;
do
{
printf(“%d\n”, i);
i += 3;
} while( i < 10 );
0
3
6
9
(c)
int i;
for(i=0; i<10; i+=2)
{
printf(“%d\n”, i);
}
0
2
4
6
8
(d)
int i;
for(i=10; i>=0; i--)
{
printf(“%d\n”, i);
}
참고 자료
없음