#include struct node { int data; struct node* next; }; /* リストの内容を表示 */ void printList( struct node* p ){ /* このコメント文を消して,必要なプログラムコードを書き込みなさい. */ } int main(void){ struct node sample[3]; struct node* head; /* 各データを格納 */ sample[0].data = 2; sample[1].data = 3; sample[2].data = 5; /* 各ノードを連結 */ head = &sample[0]; sample[0].next = &sample[1]; sample[1].next = &sample[2]; sample[2].next = NULL; /* リストの内容を表示 */ printList(head); return 0; }