So am trying to write a trivial program just for fun. Intent is to print the value of an integer using char pointer
So you can see I have an integer a, which I print and then I use a char* b to get the higher byte location of the integer and then get the lower byte using post-increment operation of char* b
But on https://code.sololearn.com the line which prints *b and *b++, throws warning for *b++. Am interested in knowing what is the way to remove that warning.
#include <stdio.h>
int main(void) {
int a = 0xaabb;
printf("%x\n",a);
unsigned char *b = (unsigned char*) &a;
printf("%x%x\n",*b, *b++);
return 0;
}