정보처리기사 2022년 1회 76번

IT위키

과목: 프로그래밍 언어 활용

문제[편집 | 원본 편집]

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번

해설[편집 | 원본 편집]

같이 보기[편집 | 원본 편집]