«implementation-defined-behavior» 태그된 질문




6
비트 필드에 값을 할당해도 동일한 값이 반환되지 않는 이유는 무엇입니까?
이 Quora 게시물 에서 아래 코드를 보았습니다 . #include <stdio.h> struct mystruct { int enabled:1; }; int main() { struct mystruct s; s.enabled = 1; if(s.enabled == 1) printf("Is enabled\n"); // --> we think this to be printed else printf("Is disabled !!\n"); } C 및 C ++ 모두에서 코드 출력이 …
당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.