Which of the following statements (a-d) are true if the following lines of code
ID: 3697277 • Letter: W
Question
Which of the following statements (a-d) are true if the following lines of code are executed? int G = 17; int &H; = G; A. H is now an alternate name for G B. Adding 1 to H will change the value of G to 18 C. Subtracting 5 from G and printing H will display the value 12 D. The condition H == G will give a true result E. All of the statements (a-d) are true The:: (called scope resolution) operator is used to associate a method with a specific class. A. true D. false If a string will need room for 25 characters, how should it be defined so that it will be a valid string? A. char str[25]; B. char str[24]; C. char str[26]: D. char str[]; Which of the following statements (a-d) about classes is true? A. A class can contain both data members and methods B. The members of a class may be private or public C. The name of the constructor is always the same as the name of the class D. The class definition contains prototype statements for the methods E. All of the statements (a-d) are true.Explanation / Answer
14) option E
The variable H is a local reference variable that has been assigned to the variable G. Therefore, any change that is applied to G will effect H and any change that is applied to H will effect G.
15) option A
16) option C
25 characters for the string plus 1 for the null terminator equals 26 characters total.
17)option E
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.