Advertisement
Guest User

Untitled

a guest
Sep 24th, 2017
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.30 KB | None | 0 0
  1. 1:  /* 05L01.c: Reading input by calling getc() */
  2.  
  3. 2:  #include <stdio.h>
  4.  
  5. 3:
  6.  
  7. 4:  main()
  8.  
  9. 5:  {
  10.  
  11. 6:     int ch;
  12.  
  13. 7:
  14.  
  15. 8:     printf("Please type in one character:\n");
  16.  
  17. 9:     ch = getc( stdin );
  18.  
  19. 10:    printf("The character you just entered is: %c\n", ch);
  20.  
  21. 11:    return 0;
  22.  
  23. 12: }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement