Question: The array will end with a NULL pointer, so your code can detect its last element. split will ignore (discard) blank spaces and tabs before

The array will end with a NULL pointer, so your code can detect its last element. split will ignore (discard) blank spaces and tabs before and between words. It will also remove colons from the end of a word, which is convenient because a target will end with a colon. For example, if called on a line parrots: eat carrots, a dynamically-allocated array with four elements will be returned, which are in order) the strings parrots, eat, carrots, and NULL (the three non-NULL strings, and the array itself, are all dynamically allocated).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!