prog.cpp: In function 'void printbits(unsigned int)':
prog.cpp:7:33: error: 'printf' was not declared in this scope
printf("%d", (x & (mask << i)));
^
prog.cpp:8:25: error: 'putchar' was not declared in this scope
if(!i % 4) putchar(' ');
^
prog.cpp:10:14: error: 'putchar' was not declared in this scope
putchar('\n');
^