프로그래밍 언어 활용난도 중상
16번 · 주관식 · 5점
다음 C 프로그램의 실행 결과를 쓰시오.
#include <stdio.h>
struct Node {
int value;
struct Node *next;
};
int main(void) {
struct Node a = {1, NULL};
struct Node b = {2, NULL};
struct Node c = {3, NULL};
a.next = &b;
b.next = &c;
c.next = NULL;
c.next = &a;
a.next = &b;
b.next = NULL;
struct Node *head = &c;
printf("%d %d %d", head->value,
head->next->value,
head->next->next->value);
return 0;
}