Contents

조회 수 6954 댓글 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>

?

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
393 System/OS [linux] DHCP(Dynamic Host Configuration Protocol) 서버 hooni 2003.04.23 13090
392 System/OS [linux] DNS(Domain Name System) 설치, 설정 hooni 2003.04.23 12509
391 System/OS [linux] GD 라이브러리 설치 방법.. file hooni 2013.04.23 11462
390 System/OS [linux] iconv를 이용하여 euc-kr 문서를 utf-8로 대량으로 변환하기 file hooni 2014.01.09 12286
389 System/OS [linux] ipchains 사용예(패킷 필터링) hooni 2003.04.23 14239
388 System/OS [linux] ipchains 옵션 hooni 2003.04.23 13696
387 System/OS [linux] ipfwadm를 이용한 패킷필터링(구버전) hooni 2003.04.23 13089
386 System/OS [linux] iptables 명령어 매뉴얼(options) hooni 2003.04.23 11404
385 System/OS [linux] iptables 초간단 세팅 스크립트 hooni 2017.09.26 1396
384 System/OS [linux] man 명령어 뽀개기.. hooni 2003.04.23 8775
383 System/OS [linux] Masquerade 가상 ip분할기법 hooni 2003.04.23 48008
382 System/OS [linux] Oracle8.1.6, Mysql+PHP+Zend Optimizer+APACHE+Tomcat(jsp,servlet)+IMAP+gd hooni 2003.04.23 32523
Board Pagination Prev 1 ... 61 62 63 64 65 66 67 68 69 70 ... 98 Next
/ 98