-
bitwise operator 는 부등호보다 연산자 우선순위 낮음실수모음 2022. 8. 31. 11:19123456789101112131415161718#include <bits/stdc++.h>using namespace std;int main(){ios::sync_with_stdio(false);cin.tie(0), cout.tie(0);int a = 0;// 다음은 0이 출력 됨cout << (a&(1<<0)) << endl;// 다음은 1이 출력됨if(a&(1<<0) == 0) cout << 0 << endl;else cout << 1 << endl;return 0;}cs
a&(1<<0) == 0 이 아니라
(a&(1<<0)) == 0'실수모음' 카테고리의 다른 글
[c++] % 연산시 주의할 점 (0) 2022.12.20 와이라노?? (0) 2022.12.19 python 은 정수나눗셈이 // ! (0) 2022.12.18 c++ longlong 범위 (0) 2022.12.18 [c++] -1 % 4 == -1 (0) 2021.07.08