sir static variable is created only once and its value continues in further calls as well
but sir what about that dynamically created array
is it created once or
it is created again and again
because sir when i did cout <<strlen(input>
its value will decrease as input keeps on shifting to next word after one call is completed
and in size of output array we have defined size as strlen(input)+1
so that means it is redefined again and again
so is the new ouput overwritten over the previous one??
and sir when we allocate dynamic memory then don’t we have to free that memory in the end??
plzz clear my doubt