Question: 3. (6 poinu) Strings. a. (2 ps) Consider these Matemente: string p= Star i If (p=5tar) cout e yay i) What is the differtnce between
3. (6 poinu) Strings. a. (2 ps) Consider these Matemente: string p= "Star" i If (p=5tar) cout e "yay" i) What is the differtnce between how a stateevent using the comparise eperatoe, = - is processed wiab strings in C and C++ ? i) What happens when the statements above execute in in C++7 P Eoplain yoar answer fully. b. (2 pts) Consider this codets string mystringt mysteing " "Bye"; i) What is stored in mystring after this statenient in in C++2 ii) Explain exactly what happens to the variable in mewory, you can use an illustration in your answer. c. (2 pts) Consider the following C statements: char" aldInIt ="D; char" midltr = ' x '; i) What is the difference (if any) berween the contents of these two variables? ii) Draw a dizgram of the contents of these variables is memwry (as we bave done in class, add separators as necded). midutr
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
