Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Evaluate: string happy = \"Happy birthday to you\"; happy == \"Happy birthday to

ID: 3616705 • Letter: E

Question

Evaluate:
string happy = "Happy birthday to you"; happy == "Happy birthday to you "; "Happy birthday to you" == happy; string un_happy == happy[0] + string("Happy birthday toyou").substr(1); "happy" < "Happy" "happy" < happy int p1 = happy.find_first_of(" ,.!", 1); int p2 = happy. find_first_of(" ,.!", p1 +1); string what = happy.substr(p1 + 1, p2 -p1 -1);
So above are a set of expressions that I am some how supposeto evaluate. Problem is I have no idea what that really means orhow it is supposed to be done.
The text is not very helpful and adds moreconfusion.
Could someone please tell me what and how am I suppose tosolve these expressions.
I will rate lifesaver if you show me how.
string happy = "Happy birthday to you"; happy == "Happy birthday to you "; "Happy birthday to you" == happy; string un_happy == happy[0] + string("Happy birthday toyou").substr(1); "happy" < "Happy" "happy" < happy int p1 = happy.find_first_of(" ,.!", 1); int p2 = happy. find_first_of(" ,.!", p1 +1); string what = happy.substr(p1 + 1, p2 -p1 -1); string happy = "Happy birthday to you"; happy == "Happy birthday to you "; "Happy birthday to you" == happy; string un_happy == happy[0] + string("Happy birthday toyou").substr(1); "happy" < "Happy" "happy" < happy int p1 = happy.find_first_of(" ,.!", 1); int p2 = happy. find_first_of(" ,.!", p1 +1); string what = happy.substr(p1 + 1, p2 -p1 -1);
So above are a set of expressions that I am some how supposeto evaluate. Problem is I have no idea what that really means orhow it is supposed to be done.
The text is not very helpful and adds moreconfusion.
Could someone please tell me what and how am I suppose tosolve these expressions.
I will rate lifesaver if you show me how.

Explanation / Answer

I cant be positive but I'm pretty sure that what your teacher wantsyou to do is evaluate what will happen to each of those expressionsif they are put in c++. So the easiest way to do it is justmake a program and put each expression in it one by one and thenprint the expression. Whatever prints to the screen is theevaluation. So for example for the first one you wouldput string happy = "Happy birthday to you"; cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote