Skip to content

Instantly share code, notes, and snippets.

@HiromichiYamada
Last active August 29, 2015 14:04
Show Gist options
  • Save HiromichiYamada/cc482710f3f093557922 to your computer and use it in GitHub Desktop.
Save HiromichiYamada/cc482710f3f093557922 to your computer and use it in GitHub Desktop.
ビットのすべてが立っている数値を生成
#include <stdio.h>
int main(){
int flag = ~0; // 全部1になっている数値はこれでOK?
printf("flag = %x\n", flag); // --> "flag = ffffffff" .. OKっぽい.
}
// THE PERFECT INSIDER -- http://www.amazon.co.jp/dp/4062639246
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment