U
Uday Joshi
Hi
look at the code below
/* test.c */
int main(int argc, char *argv[])
{
int *x;
*x = 10;
printf("%d\n", *x);
return 0;
}
The program when compiled using gcc on Redhat Linux prints 10.
Compiled as "gcc test.c"
the question is, Is it legal not to allocate memory for the integer
pointers ? If yes, then which data types need memory allocation and
which doesn't.
Uday Joshi
look at the code below
/* test.c */
int main(int argc, char *argv[])
{
int *x;
*x = 10;
printf("%d\n", *x);
return 0;
}
The program when compiled using gcc on Redhat Linux prints 10.
Compiled as "gcc test.c"
the question is, Is it legal not to allocate memory for the integer
pointers ? If yes, then which data types need memory allocation and
which doesn't.
Uday Joshi