Quiz on String Manipulation in C
Q.1. Which among the following is Copying function?
Q.2. Which function will you choose to join two words?
Q.3. The ______ function appends not more than n characters.
Q.4. What does strcmp() function do?
Q.5. What is the prototype of strcoll() function?
Q.6. What is the function of strcoll()?
Q.7. Which of the following is the variable type defined in header string. h?
Q.8. NULL is the macro defined in the header string. h.
Q.9. What will be the output of the following C code?
const char pla[] = "string1";
const char src[] = "string2";
printf("Before memmove place= %s, src = %s\n", pla, src);
memmove(pla, src, 7);
printf("After memmove place = %s, src = %s\n", pla, src);
Q.10. Choose a correct statement about C String.
char ary[]="Hello..!";
char ary[]="Hello..!";
Q.11. What will be the output of the following C code?
const char str1[]="ABCDEF1234567";
const char str2[] = "269";
len = strcspn(str1, str2);
printf("First matching character is at %d\n", len + 1);
Q.12. How do you convert this char array to string.?
char str[]={'g','l','o','b','y'};
char str[]={'g','l','o','b','y'};
Q.13. What is the output of C Program.?
int main()
{
int str[]={'g','l','o','b','y'};
printf("A%c ",str);
printf("A%s ",str);
printf("A%c ",str[0]);
return 0;
}
Q.14. What is the maximum length of a C String.?
Q.15. What is the output of C program with strings.?
int main()
{
char str1[]="JOHN";
char str2[20];
str2= str1;
printf("%s",str2);
return 0;
}
Instructions:-
- This Quiz is based on the String Manipulation in C
- Each correct answer will carry 2 points
- Once an option is selected you cannot select any other, So choose wisely
- Do not refresh the page as it will reset the quiz
- Once the time is up the quiz will automatically get submitted with no of Question responded
- Your total score alongwith your name will be shown after submission of the Quiz
- Wish you ALL THE BEST 👍👍
START
Post a Comment
FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP