Correct the errors in the following program which is meant to accept an unspecifi ed number of strings as command-line arguments and print them as a single concatenated string: #include #include int...


Correct the errors in the following program which is meant to accept an unspecifi ed number


of strings as command-line arguments and print them as a single concatenated string:


#include


#include


int main(int argc, char argv[ ])


{


int i;


char stg[300];


char *s = stg;


for (i = 0; i <>


s = strcat(s, argv[i]);


printf(“Concatenated string = %s\n”, s);


return 0;


}



May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here