1. Differentiate between call by and call by reference.
2. What are the two ways of invoking functions?
3. What is the roll of the keyword void in declaring a function?
4. Write the prototype of a function which return true if a number is prime else return false.
5. Write two advantages of using functions in a program.
6. What is a pure function and what is an impure function?
7. In what way is OOPs principle polymorphism adopted in programming?
8. What is the output if 100 and 50 are passed to the following function?
Void paws(int a , int b)
{ a = a+b; b = a – b; b = a –b ; [Link](a+”,”+b);}
9. Differentiate between formal and actual parameter.
10. Write function prototypes
a. Prints the smallest of three numbers.
PROGRAMS
design a class to overload a function series () as follows
i. double series(double n) with one double argument an return the sum of the series.
1 1 1 1
∑ ¿ 1 + 2 + 3 +…+ n
ii. double series(double n) with one double argument an return the sum of the series.
1 4 7 10
∑ ¿ a 2 + a5 + a 8 + a11 +… n terms