C Language MCQ - English
Which of the following function is used to find the first occurrence of a given
Home | Discussion ForumWhich of the following function is used to find the first occurrence of a given string in another string?
Answer : C
Feel free to find and hire your online essay writer to help you with papers. AdvancedWriters will not let you down.
View More Related Question
1) What will be the output of the program ? #include<stdio.h>
int main()
{
printf(2+"C Programming MCQ on Study 2 Online\n");
return 0;
}
View Answer
2) What will be the output of the program ? #include<stdio.h>
#include<string.h>
int main()
{
char str[] = "Study 2 Online\0 C Language MCQ\0";
printf("%s\n", str);
return 0;
}
3) What will be the output of the program ? #include<stdio.h>
int main()
{
printf("Study 2 Online", " C Language MCQ\n");
return 0;
}
4) Which of the following function sets first n characters of a string to a given character?
5) What is the output of this C code?
#include <stdio.h>
#include <string.h>
int main()
{
char *str = "hello, world";
char str1[9];
strncpy(str1, str, 9);
printf("%s %d", str1, strlen(str1));
}