Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

convert ascii to decimal

Status
Not open for further replies.

glogic

Programmer
Nov 8, 2001
15
0
0
IE
hey there.. i am having trouble converting a decimal double digit number that is in a variable out of ascii.. when ever i try to print to the screen it gives me the ascii value for the number e.g 40 = (
when i just want to print 40

 


char a=40;

printf("%d",a); // will print 40
printf("%c",a); // will print '/'

or

printf("%d",'/'); // will print 40
printf("%c",'/'); // will print '/'
 
Look at my post in your other thread. The answer for assembly is there.

GuyZana, this is an assembler forum. "Information has a tendency to be free. Which means someone will always tell you something you don't want to know."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top