Shammer's Philosophy

My private adversaria

2015-10-20から1日間の記事一覧

16進数を2進数で表示させる

C

C言語で2進数を表示させる・改 - Shammerismで言及した関数を書いた。 #include <stdio.h> #include <stdlib.h> #include <string.h> void print_as_b_value(const long value){ unsigned long bit = (1L << (sizeof(long) * 8 - 1)); int i = 0; int x = 0; for( ; bit != 0 ; bit >>= 1,</string.h></stdlib.h></stdio.h>…