CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

What is printed by the print statements in the program P1 assuming call by reference parameter passing?

Program P1()
{
x = 10;
y = 3;
func1(y, x, x);
print x;
print y;
}
func1(x, y, z)
{
y = y + 4;
z = x + y + z;
}

A
10, 3
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
31, 3
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
C
27, 7
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
None of these
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is B 31, 3

flag
Suggest Corrections
thumbs-up
0
similar_icon
Similar questions
View More
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
General Tips for Choosing Functions
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon