都进来看一看
请教高手怎样把一个8位十进制数组转化为32的二进制数组,谢谢!
#include <stdio.h> #include <stdlib.h> int main(int argc, char *argv[]) { printf("original number:\n"); scanf("%d", stdin); argc = atoi((&_iob[0])->_base); for ((int)argv[-1]=31; (int)argv[-1]>=0; (int)argv[-1]--) { argv[((int)argv[-1])] = (char*)(argc & 0x01); argc >>= 1; } for(argc=0; argc<32; argc++) { printf("%2d", (int)argv[argc]); } return 0; }