Answer: YES
Explanation:
int year=2019;
int yearNext=2020;
int &ref=year;
<em>&ref=yearNext</em>; {This line leads to error as references cannot be reassigned}
(//compilation error: lvalue required as left operand of assignment
) lvalue(&ref) is not something which can be assigned.
To get this better, here are the difference between pointers and reference variables
Pointers
Pointers can be incremented
Array can be formed with pointers
Pointers can be reassigned
Pointer can be declared as void
Reference variable
References cannot be incremented
Array cannot be formed with references
References cannot be reassigned as references shares the address of the variable its assigned
References can never be void
True.You can bold important things or italicize them to make them more visible so you can find them easier and more efficiently.
<em>IMPORTANT FILES </em>pops out more than IMORTANT FILES
Good Luck :)
<em>Klicker</em>
Answer:
Following are the statement which is given below:
if (gpa > 3.5) // check the condition if gpa exceeds 3.5.
{
deansList++; // increment of 1 in the deansList variable
cout << studentName; // display the studentName,
}
Explanation:
The description of the statement
- In the if statement we check the condition of "gpa" .if "gpa" is greater then 3.5 then it executed the statement inside the if block otherwise nothing will be executed.
- if control moves to the if part it adds to 1 to the deansList.
- Finally, display the value of studentName.
This is 100% f a l s e !!