#include<stdio.h>
#include<conio.h>
struct abc
{
char p[1];
};
int main()
{
struct abc *c =NULL;
char name[]="abcde";
c = (struct abc *) malloc (sizeof(struct abc));
strcpy(c->p,name);
printf("%s",c->p);
getch();
return 0;
}
why it is printing the whole string "abcde"..????there is not enough memory
in array 'p'...
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.