Contents

Views 6927 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/06] sizeof, 실수표현, 메모리, 연산자

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

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

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

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

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

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

    Date2003.04.23 CategoryDevelop Byhooni Views6821
    Read More
  8. [c] 단기과정[01/14] 피보나치, 파스칼.. 파일입출력

    Date2003.04.23 CategoryDevelop Byhooni Views7081
    Read More
  9. [c] 단기과정[01/15] 피보나치, 파스칼.. 링크리스트

    Date2003.04.23 CategoryDevelop Byhooni Views7234
    Read More
  10. [c] 단기과정[01/17] 후위연산 스택 계산기..

    Date2003.04.23 CategoryDevelop Byhooni Views7226
    Read More
  11. [c] 단기과정[01/24] 정렬 알고리즘

    Date2003.04.23 CategoryDevelop Byhooni Views6955
    Read More
  12. [js] 새로고침(refresh)방법과 다른 페이지 바꾸기..

    Date2003.04.23 CategoryDevelop Byhooni Views6521
    Read More
Board Pagination Prev 1 ... 12 13 14 15 16 17 18 19 20 21 ... 98 Next
/ 98