ExamVeda
Login
Home
11
What does the 'strcpy()' function do in C++?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
12
What is the output of the following code: char str[] = "Hello"; cout << sizeof(str); in C++?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
13
What is the correct way to initialize a string object named 'str' in C++?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
14
What is the purpose of the 'strcat()' function in C++?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
15
What is the output of the following code: char str[] = "Hello"; cout << str; in C++?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
16
Which of the following correctly initializes a two-dimensional array named matrix in C++ with dimensions 3x3?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
17
What is the output of the following code snippet in C++? int arr[] = {1, 2, 3, 4, 5}; cout << arr[5];
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
18
Which of the following correctly defines a string variable named name initialized with the value "John" in C++?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
19
What is the purpose of the 'strcmp()' function in C++?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
20
Which of the following correctly declares an array of 10 integers in C++ and initializes all elements to zero?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board