#include <stdio.h>
#include <stdlib.h>
int main ()
{
int a=2,*p;
p=&a;
printf ("address of a=%u", p);
return (0);
}
When I execute this code on Ubuntu it will print this error:
format '%u' expects argument of type 'unsigned int',
but argument 2 has type 'int *' [-wformat].
Why this type of error even in code from a book? I know this is a stupid question but I'm very confused.