Please refer to MCQ Questions Chapter 10 Strings Class 12 Computer Science with answers provided below. These multiple-choice questions have been developed based on the latest NCERT book for class 12 Computer Science issued for the current academic year. We have provided MCQ Questions for Class 12 Computer Science for all chapters on our website. Students should learn the objective based questions for Chapter 10 Strings in Class 12 Computer Science provided below to get more marks in exams.
Chapter 10 Strings MCQ Questions
Please refer to the following Chapter 10 Strings MCQ Questions Class 12 Computer Science with solutions for all important topics in the chapter.
MCQ Questions Answers for Chapter 10 Strings Class 12 Computer Science
Question. Which of the following function is correct in case of conversion of string digits into their integer value?
a. x =atoi(string)
b. x = stoi(string)
c. x = chartoint(string)
d. all of these
Answer
A
Question. Which of the following is correct, If we write strcmp(s1,s2), returns a value?
a. <0 when s1<s2
b. = 0 when s1 =s2
c. > 0 when s1 > s2
d. all of these
Answer
D
Question. Which of the following operation could not be performed on character string with string functions?
a. Combining a string
b. copying a string to another
c. Comparing strings for equality
d. Removing a string
Answer
D
Fill in the Blanks:
Question. _________ function is used to read a character at a time.
Answer
getchar
Question. The function strlen(“India is great”) will return the length of string ________
Answer
14
Question. Every string must be terminated by ______________?
Answer
Null Character
Question. A string can be stored as an array of ______________
Answer
char
Question. _______ function is used to read a complete string.
Answer
gets
True or False:
Question. strcpy() function is used to copy strings?
Answer
true
Question. To reverse a string, we need two string handling functions strcpy() & strcmp()?
Answer
false
Question. A string is represented as array of characters?
Answer
true
Question. To use string library functions, we have to include header file string.h in our program?
Answer
true
One Word:
Question. Which of the following function is used to reverse the string?
Answer
strrev
Question. What is the length of null string?
Answer
0 (zero)
Question. If we consider the string declaration as “char x*10+;”, what is the length of the string that can be correctly represented by x?
Answer
10
Question. The function strcmp (“Abcd” ,”ABCD”) will return?
Answer
Negative value
Question. C does not support the string data type however strings are handled as an array of?
Answer
char
Question. What is missing in this string initialization: char name*8+ = ,‘r’, ‘a’, ‘e’,‘t’ -?
Answer
\0
Question. Which of the following input function cannot be used to input multiword string?
Answer
scanf()
Question. How will you declare a string named student with length 50?
Answer
char student[50];
Question. To declare and initialized a empty string, a 10 element character array named x, we have char x*10+ = “ “ ; What will be the other way for the same?
Answer
char x*10+=,‘\0’-;
Question. If the function strcat(s1,s2) is implemented , then the concatenation will return?
Answer
s2 at the end of s1
Full Forms:
Question. strcat
Answer
string concatenation.
Question. strcmp
Answer
string compares.
Question. strlen
Answer
string length.
Question. strrev
Answer
string reverse.
Question. strcpy
Answer
string copy.
Question. strupr
Answer
string upper.
Question. strlwr
Answer
string lower.
Question. atoi
Answer
ascii to integer.
We hope you liked the above provided MCQ Questions Chapter 10 Strings Class 12 Computer Science with solutions. If you have any questions please ask us in the comments box below.