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