> I can't declare initial size of string array as that depends on the user input and that can be of 10^50 size.
Well 10^50 is the approx number of atoms in the whole of planet Earth.
> What should i do?
Move to a much larger planet, where you have the resources to create a machine capable of holding 10^50 bytes of information.
Seriously though, you can't just declare a pointer and abandon your responsibility to manage the memory in a C program.
You HAVE to read the input of unknown size in known size quantities, then allocate memory as you go.
Code:
char buff[BUFSIZ];
while ( fgets(buff,BUFSIZ,stdin) ) {
// do something with buff, say malloc + strcpy
}