C Language MCQ - English
The library function used to find the last occurrence of a character in a string
Home | Discussion ForumThe library function used to find the last occurrence of a character in a string is
Answer : C
View More Related Question
1) If the two strings are identical, then strcmp() function returns
2) What will be the output of the following program?
void main()
{
char str1[] = "abcd";
char str2[] = "abcd";
if(str1==str2)
printf("Equal");
else
printf("Unequal");
}
3) What is the output of this C code?
#include <stdio.h>
int main()
{
char str[11] = "hello";
char *str1 = "world";
strcat(str, str1);
printf("%s %d", str, str[10]);
}
4) Which is more appropriate for reading in multi-word string?
5) What is the output of this C code?
#include <stdio.h>
int main()
{
char *str = "hello, world";
char *str1 = "hello, world";
if (strcmp(str, str1))
printf("equal");
else
printf("unequal");
}