fork download
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. int number = 0;
  6. char letter = '\0';
  7.  
  8. scanf("%d", &number);
  9. fflush(stdin);
  10. scanf("%c", &letter);
  11.  
  12. printf("number = %d, letter = '%c'\n", number, letter);
  13. }
  14.  
Success #stdin #stdout 0s 9424KB
stdin
42
z
stdout
number = 42, letter = '
'