Question: C Modify functions get args and print args to work with null-terminated arrays, where the size of the array is defined by its first element

Modify functions get args and print args to work with null-terminated arrays, where the size of the array is defined by its first element set to NULL. void ReadArgs(char *in, char **argy, int size) Argument size represents the number of elements allocated for argy. by the caller. The function should guarantee that the array is null-terminated under any circumstances, even if the number of tokens in string in exceeds size. Function does not return the number of arguments extracted from in anymore. void PrintArgs(char **arg) This function does not need the number of arguments to be passed to the function anymore. The function will stop printing arguments as soon as the NULL element is found. #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
