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
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;
}
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here