fork download
  1. #include <stdio.h>
  2. int main() {
  3. char ch;
  4. printf("Enter a character:");
  5. scanf("%c", &ch);
  6.  
  7. printf("ASCII value of %c is %d\n", ch, ch);
  8.  
  9. return 0;
  10.  
  11. }
Success #stdin #stdout 0s 5276KB
stdin
Standard input is empty
stdout
Enter a character:ASCII value of  is 0