I am a novice in C. I am trying to assign a value from a file to a pointer as below. However I am gettign a seg fault. Can somebody explain ?
int i1;
char *glblclrtab;
...
for (int i=0; i<20; i++)
{ while ( (i1= fgetc(ipFile))==NULL);
*(glblclrtab+i)= char (i1);
...
}
The pointer assignment in causing segmentation fault.
PLZ HELP
Thanks in Advance