fork download
  1. #include <stdio.h>
  2. int main()
  3. {
  4. char ch;
  5. printf("Enter a character");
  6. scanf("%c",&ch);
  7. printf("\n The ascii value of the ch variable is : %d", ch);
  8. return 0;
  9. }
Success #stdin #stdout 0s 5304KB
stdin
f
stdout
Enter a character
 The ascii value of the ch variable is : 102