fork(3) download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. int nc;
  6. int c;
  7. for (nc=0;(c = getchar()) != EOF;nc++)
  8. {
  9. printf("The char is '%c' code: 0x%02x\n", c >= 32 ? c : '.', c);
  10. }
  11. printf("%d\n", nc);
  12.  
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 9424KB
stdin
stdout
The char is '.' code: 0x0a
1