게시판 즐겨찾기
편집
드래그 앤 드롭으로
즐겨찾기 아이콘 위치 수정이 가능합니다.
본삭금 c언어 질문이요 ㅠㅠ
게시물ID : programmer_11052짧은주소 복사하기
작성자 : 안녕하세
추천 : 0
조회수 : 479회
댓글수 : 6개
등록시간 : 2015/06/08 23:30:21
옵션
  • 본인삭제금지
struct student {
int number;
char name[10];
double height;
struct student *next;
};
int main(void)
{
struct student s1 = { 30, "Kim", 167.2, NULL };
struct student s2 = { 31, "Park", 179.1, NULL };
struct student *first = NULL;
struct student *current = NULL;
first = &s1;
s1.next = &s2;
s2.next = NULL;
current = first;
while( current != NULL )
{
printf(“SID=%d Name=%s, Height=%f\n", current->number, current->name, current->height);
current = current->next;
}
}
 
설명좀해주세요 ㅠㅠ
first는 s1을 가리키고 s1.next는 s2를 가리키고 s2.next는 0이고 current는 first를 가리키는거 아닌가요?
 
ㅠㅠ 이해가 안돼요
dd.png

전체 추천리스트 보기
새로운 댓글이 없습니다.
새로운 댓글 확인하기
글쓰기
◀뒤로가기
PC버전
맨위로▲
공지 운영 자료창고 청소년보호