Contents

조회 수 6928 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
자료형 크기 확인하기.. sizeof (ppt. 16)
-------------------------------------------------------------------
#include<stdio .h="">

void main()
{
        printf("n char        : %d byte", sizeof(char));
        printf("n long        : %d byte", sizeof(long));
        printf("n int           : %d byte", sizeof(int));
        printf("n short       : %d byte", sizeof(short));
        printf("n unsigned : %d byte", sizeof(unsigned));
        printf("n float        : %d byte", sizeof(float));
        printf("n double    : %d byte", sizeof(double));
}
-------------------------------------------------------------------



실수형의 표현 (ppt. 9)
-------------------------------------------------------------------
#include<stdio .h="">
#define MAXBIT 31

void main()
{
        int i, cnt=0;
        union _float{
                float flt;
                long lng;
        } temp;

        temp.flt = -0.5;

        for(i=MAXBIT; i&gt;=0; i--){
                (temp.lng&gt;&gt;i)&amp;1 ? putchar('1') : putchar('0');
                if(cnt==0 || cnt==8) putchar(' ');
                else if(cnt&gt;8 &amp;&amp; !(i%8)) putchar(' ');
                cnt++;
        }
}
-------------------------------------------------------------------



메모리 위치 확인 (ppt. 12)
-------------------------------------------------------------------
#include<stdio .h="">

void main()
{
        int in=0x4142;
        char ch1, ch2;

        ch1 = in;
        ch2 = in &gt;&gt; 8;

        printf("addr of in  : %un", &amp;in);
        printf("addr of ch1 : %un", &amp;ch1);
        printf("addr of ch2 : %un", &amp;ch2);

//     printf("nch1=%c, ch2=%cn", ch1, ch2);
}
------------------------------------------------------------------- 
</stdio></stdio></stdio>

?

  1. [js] 키보드 아스키코드(ASCII) 코드보기

  2. [js] 이벤트 핸들러(Event Handlers)

  3. [js] 사라지는 브라우저

  4. [c] OpenGL 마우스 이벤트

  5. [js] 점점 커지는 새창..

  6. [c][java] 소켓 프로그래밍(채팅 서버 C, 클라이언트 Java)

  7. [c] 신기한 atoi함수(www.game79.net)

  8. [c] OpenGL 색 입방체의 회전(입체)

  9. [php] 마시마로 캐릭터 방명록

  10. [c] 시간 계산 하는 프로그램 소스코드

  11. [linux] 프로세스 관련 시스템콜

  12. [c] 문자열 처리 관련 함수들 설명

Board Pagination Prev 1 ... 3 4 5 6 7 8 9 10 11 12 ... 71 Next
/ 71