Correct the errors in the following program which is meant to concatenate a string stg with another one specifi ed as a command-line argument: #include #include int main(int argc, char argv[ ]) { char...


Correct the errors in the following program which is meant to concatenate a string stg with


another one specifi ed as a command-line argument:


#include


#include


int main(int argc, char argv[ ])


{


char stg[ ] = “ABCDEFGH”;


printf(“Concatenated string = %s\n”, strcat(stg, argv[0]));


printf(“Length of stg = %d\n”, strlen(stg));


return 0;


}



May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here