STRTOK FUNCTION

HEY,
I WANT TO ASK YOU ONE THING THAT IN THE strtok function .
1st time we are passing whole string as a parameter for getting the first token.right?

now, for getting the 2nd token , why we are passing NULL as a parameter in strtok(NULL,delim);?

hello @CODER_JATIN

if we will again pass same string then strtok pointer will reinitialise.
and it will give only starting word of the sentence.

thats why we pass NULL to avoid reinitialisation.
in string seection its internal implementation is covered there u will get good clarity about why we r passing null.

ok ji , thank you. . .