정보처리기사 2022년 1회 76번: 두 판 사이의 차이
IT위키
Maintenance script (토론 | 기여) (Imported from text file) |
(차이 없음)
|
2022년 10월 22일 (토) 01:01 기준 최신판
과목: 프로그래밍 언어 활용
문제[편집 | 원본 편집]
76. 다음 C언어 프로그램이 실행되었을 때, 실행 결과는?
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
char str1[20]="KOREA";
char str2[20]="LOVE";
char* p1=NULL;
char* p2=NULL;
p1=str1;
p2=str2;
str1[1]=p2[2];
str2[3]=p1[4];
strcat(str1, str2);
printf("%c", *(p1+2));
return 0;
}
- ① E
- ② V
- ③ R
- ④ O
풀어보기[편집 | 원본 편집]
정답[편집 | 원본 편집]
- 3번