#include<stdio.h>
#include<stdlib.h>
struct Graph
{
int v;
};
int main()
{
struct Graph* graph = (struct Graph*) malloc(sizeof(struct Graph));
graph -> v = 1;
printf("%u", graph);
return 0;
}
But I get a warning regarding the format in line:
printf("%u", graph);
The warning is:
/home/praveen/Dropbox/algo/c_codes/r_2e/main.c|14|warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘struct Graph *’ [-Wformat=]|
What format specifier should I use for type struct Graph *
?