1 2 3 4 5 6 7 8 9 10 11
#include <stdio.h> int main() { int c; while ((c = getchar()) != EOF) { printf("\\x%X", c); if ( c == '\n' ) { puts(""); } } }