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
int a = 0x236would seem to achieve the result you want.int a = 0xec;?