Code:
#include <stdio.h>
int main()
{
    int i=3;
    float j=1.5;
    char k='c';
    printf("%u, %u, %u\n", &i, &j, &k);
    return 0;
}
My book said the memory location of these variables is contiguous. But I have got like below :
Code:
3216967268, 3216967272, 3216967279
And three warnings :
Code:
gcc -Wall -o "untitled1" "untitled1.c" (in directory: /home/duh/Desktop/C)
untitled1.c: In function ‘main’:
untitled1.c:7:2: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘int *’ [-Wformat]
untitled1.c:7:2: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘float *’ [-Wformat]
untitled1.c:7:2: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 4 has type ‘char *’ [-Wformat]
Compilation finished successfully.
How to avoid these error message?

Thanks.