CMSC 202 / C++ Exam 1 - True/False
If the value of dollars is 5.0, the following statement will output 5.00: cout << fixed << showpoint << setprecision(4) << dollars << endl;
False
In the statement cin >> x;, x can be a variable or an expression
False
The only difference btn C-strings and string objects is how they're declared + internally stored. They're used exactly the same way.
False
when you make a fn call, the order of the arguments you send does not matter as long as the # of arguments matches the # of params the fn has.
False
&& operator represents logical AND.
True
A structure has member variables, like an object, but are usually public and accessed directly w/ the dot operator, instead of calling member fns.
True
An expression in a C++ if statement that evals to 5, -5, or for that matter anything other than 0, is considered true.
True
Arrays can be passed to functions, but individual array elements cannot be.
True
In the statement: int * p, *q; p and q are pointer variables.
True
The & operator, also known as the address operator, returns the memory address of a variable.
True
The following two statements will assign the same value to result: result = a + b * c; result = b * c + a;
True
These three statements all do the same thing: int *r; int* r; int * r;
True