Ex01-변수 종류별 선언

CODEDRAGON Development/C, C++

반응형

변수 종류별 선언

   

   

변수의 종류

정수형 변수

char형, short형, int형, long형

실수형 변수

float형, double형, long double형

   

   

소스코드

   

#include <stdio.h>
int main(void) {
        //
스택이라는 메모리 공간에 저장
        //int   : integer (
정수)
        int a;   //
변수 a (메모리 공간 a)
        int b;   //
변수 b (메모리 공간 b)
//
정수형 변수:     char, short, int, long
//
실수형 변수:     float, double, long double
        int c;                  //
정수형 변수 선언하기
        float d;                //
실수형 변수 선언하기
        return 0;
}

 


   

 

출력결과

출력결과 없음

반응형