topic/Strings
Start Test
Question No
Title
Type
Marks
555.
Which of the following function sets first n characters of a string to a given character?
MCQ
5
556.
If the two strings are identical, thenstrcmp()function returns
MCQ
5
557.
How will you print \n on the screen?
MCQ
5
558.
The library function used to find the last occurrence of a character in a string is
MCQ
5
666.
The string built using the String class are immutable (unchangeable), whereas, the ones built- using the StringBuilder class are mutable.
MCQ
5
559.
Which of the following function is used to find the first occurrence of a given string in another string?
MCQ
5
663.
Which of the following statements are true about the C#.NET code snippet given below?String s1, s2; s1 = "Hi"; s2 = "Hi";String objects cannot be created without usingnew.Only one object will get created.s1ands2both will refer to the same object.Two objects will get created, one pointed to bys1and another pointed to bys2.s1ands2are references to the same object.
MCQ
5
664.
Which of the following will be the correct output for the C#.NET code snippet given below?String s1 = "ALL MEN ARE CREATED EQUAL"; String s2; s2 = s1.Substring(12, 3); Console.WriteLine(s2);
MCQ
5
665.
Which of the following statements will correctly copy the contents of one string into another ?
MCQ
5
667.
Which of the following will be the correct output for the C#.NET code snippet given below?String s1 = "Nagpur"; String s2; s2 = s1.Insert(6, "Mumbai"); Console.WriteLine(s2);
MCQ
5