for( i = 0; i < MAX - 1 && str2[i] != '\0' ; i ++ ){ str1[i] = str2[i]; } str1[i] = '\0';
void list_push(Node *root, int num){ Node *p; p = list_make_node(num); if( p == NULL ){ exit(-1); /* エラー終了 */ } p->next = root->next; root->next = p; }
int list_pop(Node *root){ Node *p; int ans; p = root->next if( p == NULL ){ exit(-1); /* エラー終了 */ } ans = p->val; root->next = p->next; free(p); return ans }