#include <stdio.h>
typedef struct _ts {
char name[20];
int key;
} st_list_t ;
st_list_t *headp , *lastp;
int main()
{
if ( headp == lastp == NULL )
fprintf( stderr , "all Null Pointer\n" );
else
fprintf( stderr , "something wrong\n" );
}
이상을 실행하면
all Null Pointer 이 아니라
something wrong이 나옵니다.
headp , lastp가 전역외부변수이므로 0값을 가지므로
all Null Pointer가 찍혀야 맞지 않나요?