fork download
  1. #include <stdio.h>
  2. int main()
  3. {
  4. char c;
  5. printf("Enter a character: ");
  6. scanf("%c", &c);
  7. printf("ASCII value of %c = %d", c, c);
  8. return 0;
  9. }
Success #stdin #stdout 0s 4516KB
stdin
12345
stdout
Enter a character: ASCII value of 1 = 49