#1
Which of the following is the correct way to declare a string variable in Java?
1 answered
#2
What does the 'new' keyword do when initializing a string variable in Java?
#3
Which of the following is a correct way to concatenate strings in Python?
#4
In JavaScript, which method is used to find the length of a string?
#5
Which of the following is NOT a valid way to declare a string variable in C++?
#6
In Python, what will the expression 'len('hello')' return?
#7
Which of the following characters is used to represent the end of a string in C programming?
#8
What does the 'trim()' method do in Java when applied to a string?
#9
Which of the following is a valid way to declare a string variable in JavaScript?
#10
What method is used to convert a string to lowercase in JavaScript?
#11
In C++, what is the result of the following code: string myString = "Hello" + "World";
#12
Which method is used to compare two string objects in Java?
#13
What is the output of the following C# code: string str = "hello"; Console.WriteLine(str[0]);
#14
Which of the following methods is used to convert a string to uppercase in Python?
#15
Which of the following methods is used to check if a string contains a specific substring in JavaScript?
#16
What is the output of the following C# code: string str = "hello"; Console.WriteLine(str.ToUpper());
#17
Which operator is used for string concatenation in PHP?
#18
What is the output of the following Python code: print('hello'.index('l'))?
#19
In Python, which method is used to split a string into a list of substrings based on a delimiter?
#20
What will the expression 'str1 + str2' do in C++ if str1 and str2 are string variables?
#21
What is the difference between String and StringBuilder in Java?
#22
In Java, what is the purpose of the 'intern()' method in the String class?
#23
In Java, which method is used to convert an int to a string?
#24
In C++, what function is used to find the length of a string?
#25