Find the error in each of the following program segments and explain how to correct it "In C" :
A)
char s[10];
strncpy(s, “hello”, 5);
printf(“%s\n”, s);
B) printf(“%s”, ‘a’);
C)
char s[12];
strcpy(s, “Welcome Home”);
D)
if (strcmp(string1, string2)) {
puts(“The strings are equal”);
}
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here