Contents

Views 8368 Comment 0
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
자료형 크기 확인하기.. 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>

?

List of Articles
No. Category Subject Author Date Views
579 Develop [c] 숫자 맞추는 게임.. file hooni 2013.04.23 8033
578 Develop [js] ajax를 이용해 외부문서 불러오기.. hooni 2013.04.23 8039
577 Develop [c] 바로 보고 정리할 것.. ㅋㄷㅋㄷ file hooni 2013.04.23 8044
576 Develop [c] pcapdump 파일 분석 하는 프로그램.. ㅋㅋ file hooni 2013.04.23 8057
575 Develop [php] 탐색기와 같은 다이나믹 트리(xml/xsl 이용) file hooni 2013.04.23 8073
574 Develop [c] 학교 건물 최단거리 찾는 웹 연동 프로그램 file hooni 2013.04.23 8073
573 Develop [c] 단기과정[01/15] 피보나치, 파스칼.. 링크리스트 file hooni 2003.04.23 8078
572 Develop [c] 파일(int fd)에서 개행문자 단위로 읽기 by 후리자 hooni 2013.04.23 8084
571 Develop [c++] 인라인 함수 설명과 예제.. file hooni 2013.04.23 8096
570 Develop [c] 웹 메모장.. ㅋㅋ file hooni 2013.04.23 8115
569 Develop [c] 문자열 컨트롤 함수로 만든 프로그램들.. file hooni 2003.04.23 8115
568 Develop [pdf] C++ 국제 표준 문서 file hooni 2013.04.23 8122
Board Pagination Prev 1 ... 18 19 20 21 22 23 24 25 26 27 ... 71 Next
/ 71