다음 C 프로그램의 실행 결과는?#include<stdio.h&g… | [9급 서울시 컴퓨터일반] 16년 2회차 기출문제 상세 페이지
1[9급 서울시 컴퓨터일반] 16년 2회차
다음 C 프로그램의 실행 결과는?#include<stdio.h>
struct student
{
char name[20]; // 이름
int money; // 돈
struct student* link; // 자기 참조 구조체 포인터 변수
};
int main(void)
{
struct student stu1 = {"Kim", 90, NULL };
struct student stu2 = {"Lee", 80, NULL };
struct student stu3 = {"Goo", 60, NULL };
stu1.link = &stu2;
stu2.link = &stu3;
printf("%s %d \n", stu1.link->link->name, stu1.link->money);
return 0;
}
1
Goo 80
2
Lee 60
3
Goo 60
4
Lee 80
해설
등록된 해설이 없습니다.
오류나 개정된 내용이 보이면 알려주세요