Answered step by step
Verified Expert Solution
Question
1 Approved Answer
106. What is the output of the following code, assuming proper libraries have been included? char* s = string1; char t[] = string2; if (strcmp(s,t))
106. What is the output of the following code, assuming proper libraries have been included?
char* s = "string1"; char t[] = "string2"; if (strcmp(s,t)) cout << "true"; else cout << "false";
Group of answer choices
No output, compiler error
false
true
Unpredictable runtime error
110. The code snippet below creates what kind of a problem?
int main() { string* myword; for (int i = 0; i < 14; i++) { myword = new string("YouHadMeAtHello"); } cout << *myword << endl; return 0; }
Group of answer choices
Off by one error
Array index out of bounds
Memory leak
Null pointer dereference
112. Which of the following statements is the legal way of declaring a vector of pointers?
Group of answer choices
vector
vector
vector
vector*
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started