C/C++ 位運算

#include<bits/stdc++.h> using namespace std; int main() { /* 按位與運算 & 把某些位變成0 其他位不變 */ //把int類型低8位置0,其他不變 int n = 231; n &= 0xffffff00; printf("%d\n",n); //short類型的低8位置零 n &
相關文章
相關標籤/搜索