I need to keep this string empty every time i execute the loop.
I done this to do so.
but I think it is a bad idea. Is there any better idea to do itCode:while(some_cond) { string=(char *)malloc(20); while(cond) { string[index]=assigne_something; ++index; } }