2009-04-26 11:48:41 UTC
OS: UNIX
PROGRAM:
#include
#include
int main(void)
{
int *pointer = malloc(sizeof(*pointer));
printf("%d\n", pointer);
int *pointer2 = malloc(sizeof(*pointer2));
printf("%d\n", pointer2);
int *pointer3 = malloc(sizeof(*pointer3));
printf("%d\n", pointer3);
int *pointer4 = malloc(sizeof(*pointer4));
printf("%d\n", pointer4);
return 0;
}
OUTPUT:
malloc2.c: In function `main':
malloc2.c:7: warning: int format, pointer arg (arg 2)
malloc2.c:9: warning: ISO C90 forbids mixed declarations and code
malloc2.c:10: warning: int format, pointer arg (arg 2)
malloc2.c:12: warning: ISO C90 forbids mixed declarations and code
malloc2.c:13: warning: int format, pointer arg (arg 2)
malloc2.c:15: warning: ISO C90 forbids mixed declarations and code
malloc2.c:16: warning: int format, pointer arg (arg 2)
133568
133584
133600
133616
Thank you for your help. Have a nice day.