Answered step by step
Verified Expert Solution
Link Copied!

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 marks[5];

vector marks(5);

vector* marks(5);

vector* marks(5);

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Marketing The New Profit Frontier

Authors: Ed Burnett

1st Edition

0964535629, 978-0964535626

More Books

Students also viewed these Databases questions

Question

4. Devise an interview strategy from the interviewers point of view

Answered: 1 week ago