147k views
4 votes
A C++ call by reference integer parameter would look like:

a.int and x

b. char and ch

c. no answer is correct

d. int x

2 Answers

4 votes

Answer:

Option(C) is the correct answer for the given question.

Step-by-step explanation:

In C++ call by reference integer parameter can be declared by the ' & ' .The correct declaration of integer type reference in c++ is int &x ;

Option(a) ,Option(b) and option(d) are the incorrect answer for the given question.

So no answer is correct .

User Siraj
by
4.6k points
3 votes

Answer:

a.int and x

Step-by-step explanation:

When you pass an integer by reference so the changes that will be made in the function on that reference variable will be reflected on the original parameter.A variable can be passed by reference either by passing a pointer to the original variable or pass the address of the variable.

Passing address int & x;

Passing pointer int * x;

User Julien Leray
by
5.1k points