편집 기록

편집 기록
  • 프로필 알 수 없는 사용자님의 편집
    날짜2018.06.21

    &&& 는 뭘 하는 건가요?


    밑의 코드를 gcc -Wall/-Waddress옵션으로 컴파일하면 warning: the address of ‘i’ will always evaluate as ‘true’ [-Waddress] 이 떠요.

    근데 이게 왜 뜨는지, 무슨 뜻인지 모르겠는데 설명해주실 분 있나요?

    소스코드

    #include <stdio.h>
    
    volatile int i;
    
    int main()
    {
        int c;
    
        for (i = 0; i < 3; i++) 
        {
             c = i &&& i;
             printf("%d\n", c);
        }
    
        return 0;
    }
    
  • 프로필 김대원님의 편집
    날짜2017.11.06

    &&& 는 뭘 하는 건가요?


    밑의 코드를 gcc -Wall/-Waddress옵션으로 컴파일하면 warning: the address of ‘i’ will always evaluate as ‘true’ [-Waddress] 이 떠요.

    근데 이게 왜 뜨는지, 무슨 뜻인지 모르겠는데 설명해주실 분 있나요?

    소스코드

    #include <stdio.h>
    
    volatile int i;
    
    int main()
    {
        int c;
    
        for (i = 0; i < 3; i++) 
        {
             c = i &&& i;
             printf("%d\n", c);
        }
    
        return 0;
    }