IO 12
Problem Description
Write a program to print the ASCII value of a character
Input and Output Format:
Refer sample input and output for formatting specification.
All float values are displayed correct to 2 decimal places.
All text in bold corresponds to input and the rest corresponds to output.
CODING ARENA
#include <stdio.h>
int main()
{
char no;
scanf("%c", &no);
printf("ASCII value of %c=%d",no,no);
return 0;
}
Test Case 1
Input (stdin)c
Expected Output
ASCII value of c=99
Test Case 2
Input (stdin)e
Expected Output
ASCII value of e=101
No comments:
Post a Comment