WorksheetsQuiz 1
Total questions: 7
Worksheet time: 11mins
In C++, the natural logarithm function log ( ) can be accessed through the header file <cmath> ; which makes log ( ) function a :
Pre-defined function
User-defined function
Standard library function
None of the them
All of them
How many parameters are declared in the following statement which contains the declaration of a function?
int Test (int x, double y, float z, char p, n)
*Type only the number as answer*
(a)
What shall be the output of the program?
82
54.67
34.833
82.503
54.67
27.833
81
54.67
27.833
89.503
54.67
34.833
82
54.67 27.833
Differentiate between variable declaration and function declaration using an example.
The argument passed by "value" to a function can be :
a variable
a constant
an expression
all of them
int module (int, int&);
int main()
{ int a = 80, b = 129, c = 144;
module(a, c);
cout << "a = " << a << ", b = " << c; }
int module (int x, int& y)
{ y = x; }
Choose the correct program output.
a = 80
b = 80
a = 80, b = 129
a = 80
b = 144
a = 80, b = 80
a = 80, c = 144
Choose the correct program output.
6
bool
returns 7
7
