1 / 7

프로그래밍 C 언어

프로그래밍 C 언어. C 의 자료형. C 의 자료형. #include &lt;stdio.h&gt; int main() { short books, weight; short total; weight = 30; books = 1500; total = books * weight; printf(&quot; 책 1500 권의 무게는 %d 이다 .<br>&quot;,total); return 0; }. C 의 자료형. sizeof 연산자 - 단항 연산자 - 할당된 메모리 크기. C 의 자료형. int main()

Download Presentation

프로그래밍 C 언어

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 프로그래밍 C 언어

  2. C의 자료형

  3. C의 자료형 #include <stdio.h> int main() { short books, weight; short total; weight = 30; books = 1500; total = books * weight; printf("책 1500권의 무게는 %d이다.\n",total); return 0; }

  4. C의 자료형 sizeof 연산자 - 단항 연산자 - 할당된 메모리 크기

  5. C의 자료형 int main() { printf("char : %d byte\n",sizeof(char)); printf("short : %d byte\n",sizeof(short)); printf("int : %d byte\n",sizeof(int)); printf("long : %d byte\n",sizeof(long)); printf("float : %d byte\n",sizeof(float)); printf("double : %d byte\n",sizeof(double)) return 0; }

  6. C의 자료형 int main() { float f; double d; f = 12345670.12; d = 12345670.12; printf("%f\n",f); printf("%f\n",d); return 0; }

  7. C의 자료형

More Related