input static variable is a pointer that holds the address or the whole string? I am not able to understand it.
Designing String Tokenizer
lets first understand what are static variable
Static variables are initialized only once. Compiler persist the variable till the end of the program. Static variable can be defined inside or outside the function.
now in this case we need to store input for future function call as well
hence we have to store it it static variable
if you make it simple variable then we will not able to use it in next function call
Thanks for the reply @asaurabh_26. But my question is that variable named input which is pointer of datatype char is holding the address of that string or the string.
it was denoted like
char *input
input=str.
it is pointer holding the address
but when you write cout<<ptr<<" ";
then it will print the whole string
this is functionality of cout