Answer to Question #308220 in C for ahmed

Question #308220

Write a program to print the ASCII value of a character input by the user.


1
Expert's answer
2022-03-11T02:26:11-0500
#include <stdio.h>

int main()
{
    char char1;
        
    printf("Enter char: ");
    char1 = fgetchar();
    getchar();
    printf("\nASCII value: %d", char1);  
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS