[c언어] sizeof 연산자

|



sizeof 연산자는 상수, 변수 그리고 연산식 결과의 크기를 byte로 표시해 주는 연산자.
sizeof 연산자의 사용방법에 대해 알아보는 프로그램

#include <stdio.h>
void main()
{
    printf("int size : %d\n", sizeof(int));
    printf("double size : %d\n", sizeof(double));
    printf("(3+5.2) size : %d\n", sizeof(3+5.2));
}

# 실행 결과

 

  ::