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 - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -