fork download
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. int asciiCode;
  6.  
  7. printf("Enter an ASCII code: ");
  8. scanf("%d", &asciiCode);
  9.  
  10. if (asciiCode >= 0 && asciiCode <= 127)
  11. {
  12. printf("The corresponding character is: %c\n",
  13. asciiCode);
  14. }
  15. else
  16. {
  17. printf("Invalid ASCII code.\n");
  18. }
  19.  
  20. return 0;
  21. }
  22.  
Success #stdin #stdout 0s 5348KB
stdin
Standard input is empty
stdout
Enter an ASCII code: Invalid ASCII code.