ASCII Value

Given a character C, print the ASCII value of that character.

Example:

Input:  c = 'b'
Output: 98

Approach

C++

#include <bits/stdc++.h>
using namespace std;

int main()
{
    char c = 'b';

    cout << (int)c << "\n";

    return 0;
}


No comments:

Post a Comment