I have a piece of code where
for ( ; ; )
{
char *buf;
/* Some code */
}
The question here will the code allocate memory every time when it cycles through the loop . I mean atleast 4 bytes will be reserved for the pointer when it cycles .
Space for the pointer will be allocated on the stack, but it will be popped off at the end of every iteration, so you don't need to worry about it.