-
sumbody pls help me
1. The function interface is:
A) the function prototype
B) the function header
C) the function return type
D) the function parameter list
2. All functions must return a value.
A) true
B) false
3. When writing an expression in C++ and using a function call in the expression, the function must:
A) have a void return type
B) have a return value
C) not have any parameters
D) have at least one parameter
4. A C++ program contains the following code segment:
string name; cout << endl << "Enter your name : "; cin >> name; cout << endl << "Your name is " << name;The input stream contains Steve OhlWhat happens when the code segment is executed?
A) it fails to display any output
B) it displays Your name is Steve Ohl
C) it displays Your name is
D) it displays Your name is Steve
5. The block of programming code within a while loop will only execute when:
A) the expression is evaluated to true
B) the expression is evaluated to false
C) the value of the expression is updated
D) the value of the expression is initialised
6. Which of the following is the equivalent of the logical expression:
!A || B && !C
A) ( !A || ( B && !C ))
B) (!( A || B ) && !C )
C) (!( A && C ) || B )
D) (( A || !B ) && C )
7. Arguments that are used for both input and output when passed to a function are passed by value.
A) true
B) false
8. The statement
cout << fixed << showpoint << setprecision (3);
will display a floating point number to a precision of 3 decimal places.
A) True
B) false
-
Good luck with your homework :)
PS consider switching to a class where you are actually interested in learning the material.
-
All of these questions are very simple. Go look at the first 5 tutorials on this very site.
Otherwise you should definetly drop your class before things get harder than multiple choice and true or false. :rolleyes:
-
Well, we finally got all the questions out of you, but you didn't post your initial answers.