The Total solution for NCERT class 6-12
Answer - 41 : -
//using call by reference
#include
void swap(int &, int &);
int main()
{
int a=10,b=20;
swap(a,b);
cout<
return 0;
}
void swap(int &c, int &d)
int t;
t=c;
c=d;
d=t;
output :
20 10
//using call by value
void swap(int, int);
swap(a,b):
void swap(int c, int d)
t=C;
C=d;
output:
10 20
Answer - 42 : -
Answer - 43 : -
Answer - 44 : -
Answer - 45 : -
Answer - 46 : -
c
+
P
R
O
G
A
M
0
1
2
3
4
5
6
7
8
9
Possible Values:Possible Output is (iii) O-R-A-GMinimum value of L = 5Maximum Value of L = 8
Answer - 47 : -
Answer - 48 : -
Answer - 49 : -
Answer - 50 : -