Hi
I have declared this line in my pgm.
char *a=NULL,*b=NULL;
then i used
scanf("%s",a); even i tried gets(a);
its giving null pointer assignment error but pgm works fine and produces correct o/p;

but when i change the pointer to array no error is there
char a[20],b[20]; //no error for this

but i want to use pointers. what can i do