939. Find the ASCII Value of a Character
You are given a single character c. Your task is to find and return the ASCII value of the given character.
Example 1:
Input:Â c = 'A'
Output:Â 65
Explanation:Â The ASCII value of uppercase 'A' is 65.
Example 2:
Input:Â c = 'e'
Output:Â 101
Explanation:Â The ASCII value of lowercase 'e' is 101.
Now Your Turn!
Pick the correct output for the given inputInput:Â c = '7'
Still unsure what the problem is asking ?
Let’s go through a few more examples, step by step, to make it clearer.
Constraints:
- The input character c will be a printable ASCII character.
- c will always be a single character.