2011-04-10から1日間の記事一覧

C言語 整数型の変数を2進数で表示するプログラム

整数型(char, short, int, long, __int64(Windows環境))を2進数で表示するプログラム #include <stdio.h> #include <limits.h> #define INT64_BIT 64 #define LONG_BIT 32 #define INT_BIT 32 #define SHRT_BIT 16 void print_binary_int64(__int64 n) { for (long i = INT64</limits.h></stdio.h>…