#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char *argv[]) {
char **argumentArray = (char **) malloc((argc+1) * sizeof(char*));
int i, j;
for(i=0; i<argc; i++) {
argumentArray[i] = (char *) malloc((strlen(argv[i])+1) * sizeof(char));
strcpy(argumentArray[i], argv[i]);
}
for(i=0; i<=argc; i++) {
printf("%s\n", argumentArray[i]);
}
}
![main.c 1 #include<stdio.h> 2 #include <stdlib.h> #include <string.h> 4 5 int main(int argc, char argvIl) 7 char **argumentArray-(char) malloc((argc+1) sizeof(char; int i, j; 9 10 argunentArray[i] (char *) malloc((strlen(argv[i])+1) sizeof (char)); 12 13 14 15 16 17 18 19 20 21 strcpy (argunentArray[i], argv[i]); printf(%s\n, argumentArray[1]); input /home/a.out Ss RPI SUNY arvard (null)](http://img.homeworklib.com/questions/0eb81870-fef5-11eb-aba0-e98cfad03fc2.png?x-oss-process=image/resize,w_560)
Hi. please find the answer above.. In case of any doubts, please ask in comments. If the answer helps you, please upvote. I am in great need of upvotes. Thanks!
Figure 3- Output 3. Modify your code in MyCommand2 to support accommodate variable variable size a...