Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please help with this exam review, and only answer if you have it ALL please!! 2

ID: 3581396 • Letter: P

Question

Please help with this exam review, and only answer if you have it ALL please!!

29) The following 4 lines of C++ code, use strings 29) Define a string object. string firstName; char lastName [7] Define a C-string firstName Abraham Assign a value to the string object lastName Lincoln Assign a value to the c string Which of the following statements is /are true? A) The 2 string definitions are correct, but the 2 assignment statements are wrong. B) The string object is defined incorrectly because no size is given for it. C) The C-string is assigned a value correctly, but the string object is not. D) The string object is assigned a value correctly, but the C-string is not. E) All 4 lines of code are correct. 300 To use the sqrt function, or other mathematical library functions, you must #include the 30) header file in your program. A) cmath. B) iostream C) mathlib D) iomanip E) algebra 31) The expression x y is called a(n) expression 31) A) relational B) arithmetic C) comparison D) binary E) logical 32) The operator is used in C++ to test for equality. 32) A) C) D) E) && RUE/FALSE. Write T if the statement is true and F if the statement is false. 33 True/False: Relational expressions and logical expressions are both Boolean, which means they 33) evaluate to true or false. MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. 34) The statement executes one statement, or block of statements, if a condition is true 34) and skips it, doing nothing, if the condition is false. A) if/else if B) switch if/endif D) if E) if/else

Explanation / Answer

Question No : 31)

The expression x < y is called a(n) Logical expression.

Question No : 32)

The == operator is used in C++ to test for equality.