C++: Given the code segment below, which of the following statements are syntact
ID: 3936825 • Letter: C
Question
C++: Given the code segment below, which of the following statements are syntactically correct? Select all that are correct. Please support the answer with an explanation.
Given the code segment below, which of the following statements are syntactically correct? Select all that are correct. struct coaster float speed; float height; coaster* next; coaster" La Vibora = new coaster; LaVibora-next = new coaster; Answers: La Answers: La_vi Vibora-next-speed 50; = *La_Vibora.*next.height15.5; (* (La_Vibora->next)) . speed50; *(*La Vibora) .next.height -15.5; * (*La_Vibora) .next.height -15.5;Explanation / Answer
answer:-
These statements are syntactically correct:
La_Vibora->next->speed =50;
(*(La_Vibora->next)).speed = 50;
These statements syntactically wrong:
*La_Vibora.*next.height =15.5;
*(*La_Vibora).next.height=15.5;
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.