14 The default value of parameter in specified in 15 Passin

14. The default value of parameter in specified in ...?

15. Passing arguments by reference is declared using the symbol below:

14. The default value of parameter is specified in..? A. Function call B. Function definition Function prototype D. Both B or O 15. Passing arguments by reference is declared using the symbol below:

Solution

Question 14:

the default value MUST be in the function prototype and not in the function implementation.

example :

int Add(int a, int b = 3);

so answer c is correct

Question 15:

Answer is : B

sample program :

#include <iostream>

using namespace std;

void changeI(int* i);
int main()
{
int i = 5;
cout << \"Before passing \" << i << endl;
changeI(&i);
cout << \"after passing \" << i << endl;
return 0;
}
// change i
void changeI(int* i)
{
*i = 34;
}

Output:

Before passing 5                                                                                                                       

after passing 34

14. The default value of parameter in specified in ...? 15. Passing arguments by reference is declared using the symbol below: 14. The default value of paramete

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site