State which of the following are true and which are false. If false, explain you
ID: 3876066 • Letter: S
Question
State which of the following are true and which are false. If false, explain your answers.
a)C++ operators are evaluated from left to right.
b)The following are all valid variable names: _under_bar_, m928134, t5, j7, her_sales, his_account_total, a, b, c, z, z2.
c)The statement cout << “a = 5;”; is a typical example of an assignment statement.
d)A valid C++ arithmetic expression with no parentheses is evaluated from left to right.
e)The following are all invalid variable names: 3g, 87, 67h2, h22, 2h.
State which of the following are true and which are false. If false, explain your answers.
a)C++ operators are evaluated from left to right.
b)The following are all valid variable names: _under_bar_, m928134, t5, j7, her_sales, his_account_total, a, b, c, z, z2.
c)The statement cout << “a = 5;”; is a typical example of an assignment statement.
d)A valid C++ arithmetic expression with no parentheses is evaluated from left to right.
e)The following are all invalid variable names: 3g, 87, 67h2, h22, 2h. State which of the following are true and which are false. If false, explain your answers.
a)C++ operators are evaluated from left to right.
b)The following are all valid variable names: _under_bar_, m928134, t5, j7, her_sales, his_account_total, a, b, c, z, z2.
c)The statement cout << “a = 5;”; is a typical example of an assignment statement.
d)A valid C++ arithmetic expression with no parentheses is evaluated from left to right.
e)The following are all invalid variable names: 3g, 87, 67h2, h22, 2h.
Explanation / Answer
Ans a.) False, because some operators are evaluated from left to right while others are evaluated from right to left.
Ans b.) True
Ans c.) False, because its an output statment and the output will be a=5; .
Ans d.) False, Arithmetic operators can appear in any order in an expression,its depends on the rules of operator precedence.
Ans e.) False, All are invalid variables except h22 because they each begin with a digit whereas h22 begins with a character.
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.