How do I print out the address a pointer is holding. Currently I'm using the code pasted below. But I'm getting this error.
Error:
t.c:13:2: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘char *’ [-Wformat]
Code:
#include<stdio.h>
#include<malloc.h>
#include<string.h>
#include<stdlib.h>
char* str;
int main(void)
{
str = (char*)malloc(200 * sizeof(char));
strcpy(str,"This is a test");
printf("\nAddress = %u",str);
return 0;
}