ASCII VALUE

SOLUTION FOR ASCII VALUE IN HACKEREARTH

QUESTION :

Given a character C, print the ASCII value of that character.
Input:
First and only line in input contains a character C.
Output:
Print the ASCII value of the character C.
Constraints:
C ASCII characters
SAMPLE INPUT
 
b
SAMPLE OUTPUT
 
98

SOLUTION :

#include<stdio.h>
int main(){
    char t;
    scanf("%c",&t);
    printf("%d",(int)t);
   
}

Protected by Copyscape

Comments

Popular posts from this blog

BIRTHDAY PARTY

spoj CPTTRN1 - Character Patterns (Act 1) solution

ROY AND PROFILE PICTURE