char b[4]; fgets(b, 4, stdin); printf(b); ...