fork download
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {char ch;
  5. printf("Please input a character\n");
  6. ch=getchar ();
  7. printf("%c,%d",ch,ch);
  8.  
  9. return 0;
  10. }
  11.  
Success #stdin #stdout 0.01s 5320KB
stdin
Standard input is empty
stdout
Please input a character
�,-1