i think that the data type of ptr should be string as it stores the address of a string type variable.Also how come ptr which actually storers the address of individual word print the word without using* unlike normal pointers of other data types
Why a char pointer "ptr" is used in string tokenizer to store individual words
Hey Sumit, data type of ptr is char* as we are talking about the standard function strtok in c which takes char* as input, and in c we use char arrays to store strings.
Hey Sumit, as you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required. And please mark your doubts as resolved in your course’s “Ask Doubt” section, when your doubt is resolved.