I have an integer returning from a function:
int a = func();
For example, a = 236.
I need to treat this as a hexadecimal representation of an integer, and store its decimal representation in another variable, so that when printed like so:
printf("%x", variable)
…the output should be:
236
If i’ve understood what you need, this little code snippet will do it
output is