Contents

Views 6952 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>

?

  1. [c] 단기과정[01/14] 피보나치, 파스칼.. 파일입출력

    Date2003.04.23 CategoryDevelop Byhooni Views7110
    Read More
  2. [c] 단기과정[01/14] 파일 입출력

    Date2003.04.23 CategoryDevelop Byhooni Views6860
    Read More
  3. [c] 단기과정[01/10] 과제.. swap(any data, ..)

    Date2003.04.23 CategoryDevelop Byhooni Views6933
    Read More
  4. [c] 단기과정[01/08] 배열, 포인터

    Date2003.04.23 CategoryDevelop Byhooni Views7260
    Read More
  5. [c] 단기과정[01/08] 과제.. 파스칼 삼각형

    Date2003.04.23 CategoryDevelop Byhooni Views7286
    Read More
  6. [c] 단기과정[01/08] (다차원 + 배열)포인터, void 포인터

    Date2003.04.23 CategoryDevelop Byhooni Views7795
    Read More
  7. [c] 단기과정[01/07] 제어문, 피보나치수열

    Date2003.04.23 CategoryDevelop Byhooni Views7432
    Read More
  8. [c] 단기과정[01/06] sizeof, 실수표현, 메모리, 연산자

    Date2003.04.23 CategoryDevelop Byhooni Views6952
    Read More
  9. [c] 다중연결 서버 만들기 #4 - thread 사용

    Date2013.04.23 CategoryDevelop Byhooni Views23747
    Read More
  10. [c] 다중연결 서버 만들기 #3 - poll() 사용

    Date2013.04.23 CategoryDevelop Byhooni Views6367
    Read More
  11. [c] 다중연결 서버 만들기 #2 - select() 사용

    Date2013.04.23 CategoryDevelop Byhooni Views9375
    Read More
  12. [c] 다중연결 서버 만들기 #1 - fork() 사용

    Date2013.04.23 CategoryDevelop Byhooni Views12945
    Read More
Board Pagination Prev 1 ... 45 46 47 48 49 50 51 52 53 54 ... 71 Next
/ 71