Click here to Skip to main content
15,506,209 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i need code that when i input a character the program will print the ASCII number of same character ??
Posted

1 solution

C++
int i = getchar();
printf("%d", i);
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 23-Oct-11 23:04pm    
As simple as that, a 5.
--SA
Richard MacCutchan 24-Oct-11 4:26am    
Am I alone in worrying at how many posters (aka developers) here seem not to understand these basics?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900