097 포인터 개념
개념 :
#include <stdio.h>
int main(void)
{
char *pCharPointer = NULL;
short *pShortPointer = NULL;
long *pLongPointer = NULL;
int *pIntPointer = NULL;
__int8 *pInt8Pointer = NULL;
__int16 *pInt16Pointer = NULL;
__int32 *pInt32Pointer = NULL;
__int64 *pInt64Pointer = NULL;
float *pFloatPointer = NULL;
double *pDoublePointer = NULL;
printf("char 의 포인터 변수의 크기 : %d Byte \n", sizeof(pCharPointer));
printf("short 의 포인터 변수의 크기 : %d Byte \n", sizeof(pShortPointer));
printf("long 의 포인터 변수의 크기 : %d Byte \n", sizeof(pLongPointer));
printf("int 의 포인터 변수의 크기 : %d Byte \n", sizeof(pIntPointer));
printf("__int8 의 포인터 변수의 크기 : %d Byte \n", sizeof(pInt8Pointer));
printf("__int16 의 포인터 변수의 크기 : %d Byte \n", sizeof(pInt16Pointer));
printf("__int32 의 포인터 변수의 크기 : %d Byte \n", sizeof(pInt32Pointer));
printf("__int64 의 포인터 변수의 크기 : %d Byte \n", sizeof(pInt64Pointer));
printf("float 의 포인터 변수의 크기 : %d Byte \n", sizeof(pFloatPointer));
printf("double 의 포인터 변수의 크기 : %d Byte \n", sizeof(pDoublePointer));
return 0;
}
결과:
1. 32bit 플랫폼
2. 64bit 플랫폼
#c언어, #c언어입문, #프로그램입문, #포인터,#pointer,#포인터크기,#포인터개념