Question: Create an argument tokenizer in C Language. Calling argtok() should return a newly allocated null-terminated array of pointers to allocated strings containing each token from

Create an argument tokenizer in C Language.

Calling argtok() should return a newly allocated null-terminated array of pointers to allocated strings containing each "token" from the input string submitted by the user.

The vector returned by argtok() and the strings referenced by it, should all be allocated using malloc.

Count the bytes in each token and then allocate memory to hold string, copy over each character, terminate with a NULL character have token vector entry point to this string.

Return pointer to token vector.

Create your own call functions as you are not allowed to use functions within string.h like strtok().

Example:

$ my name is

{my, name, is, 0}

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 Databases Questions!