What is assigned to newStr after the following code is executed?
?
string orgStr = "Hello there!";
string newStr = orgStr.substr(1, orgStr.length() - 1);
?

A. Hello there
B. ello there
C. Hello there!
D. ello there!

Answer: D

Computer Science & Information Technology

You might also like to view...

A swollen battery is one that

A) Is showing some age issues B) Bulges and might even leak C) Does not need to be replaced D) Will not hold a charge

Computer Science & Information Technology

Complete function incr so its effect mimics the prefix increment of an integer variable: that is, both ++i and incr(&i) would add 1 to i and evaluate to the incremented value.

What will be an ideal response?

Computer Science & Information Technology