c - ASCII to decimal value -


consider below example:

char  = '4';  int c = (int)a;   // gives hex value of '4' 0x34 

but want result 4 integer. how this? hex2dec conversion?

int = - '0'; printf("%d",i); 

the char values digits 0 9 contiguous , make use of here shown above.


Comments

Popular posts from this blog

java - Unable to make sub reports with Jasper -

scala - play framework: Modules were resolved with conflicting cross-version suffixes -

Save and close a word document by giving a name in R -