I want to take a string from stdin, but I don't need a static array of fixed size
I know that scanf needs something where to save the stdin input, but I cannot do something like this:
char string[10] scanf("%s",string);
becouse I need to know how long the string will be in order to allocate the required memory space.
Can you help me solve this problem?
woooooooo
I'm still blocked by this problem ... I'm going crazy
can you give me a working code?
source share