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

javascript - IndexedDB error: Uncaught DataCloneError: Failed to execute 'put' on 'IDBObjectStore': An object could not be cloned -

amazon web services - When using Cognito credentials with AWS in a browser (javascript), keep getting "missing credentials" error -

c# - How to set the datatextfield value instead of the value on a drop down list? -