Recursive function and its benefits


Q1. What do you mean by recursive function? Illustrate the benefit of using the recursive function?

Q2. Write the two C programs which compute factorial of a number by using recursion and iteration? Compare and contrast the two approaches.

Q3. Write down the function to eliminate duplicates from an ordered array. For illustration, if input is: a,a,c,d,q,q,r,s,u,w,w,w,w; then the output must be a,c,d,q,r,s,u,w.

Q4. Write down a function to sort the characters of string passed to it as the argument.

Q5. Differentiate between the given giving appropriate illustrations:

a) Call by value and Call by reference
b) Global and local variables.
c) do..while and while loops

Q6. Define the term structure. How it is distinct from union? Describe the differences by giving appropriate illustrations. 

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Recursive function and its benefits
Reference No:- TGS011335

Expected delivery within 24 Hours