C Language MCQ - English
Which of the following function sets first n characters of a string to a given c
Home | Discussion ForumWhich of the following function sets first n characters of a string to a given character?
strinit()
strnset()
strset()
strcset()
Answer : B
View More Related Question
1) Which of the following function is more appropriate for reading in a multi-word string?
2) How will you print \n on the screen?
3) 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;
}
4) If the two strings are identical, then strcmp() function returns
5) 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]);
}