Can anybody tell me how to allocate memory to a pointer which is to used in scanf.
when i used above code fragment in my program it returns segmentation error. I suppose its due to not allocating memory for varpointer.Code:
scanf("%s" , varpointer); // read some chars here
So please advice me how to allocate memory to varpointer ?
appreciate your time.