248 views
0 votes
0 votes
How to store ASCII value of a characters in c?

Example:

main()

{

char CH='A';

printf("%d",CH );

return 0;

}

I want to store this o/p in a variable.

1 Answer

2 votes
2 votes

characters are mapped to unsigned intergers.(ASCII)

int CH = 'A'; // CH stores 65

Related questions

0 votes
0 votes
0 answers
4
saurabh111 asked Nov 2, 2018
251 views
in char data type ,plzzz tell me initilization can be seprated from declaration..