Programming for Problem Solving (ES-CS291)
2024
ROLL
NAME
Learning outcome: Students will be able to write functions and
recursive programs.
ASSIGNMENT: V
Sl. Program Listing Date Signature
No
1 Write a function to interchange the value of two variables using
call by value.
2 Write a function to interchange the value of two variables using
call by address.
3 Write a program to find the Factorial of a number using
recursion.
4 Write a program to find the GCD of two numbers using
recursion.
5 Write a program to display n number of Fibonacci numbers
using recursion.
6 Write a program to reverse a given line of text using recursion.
7 Write a recursion program to calculate power operation xy
where x and y are given.
8 Write a program to solve Tower of Hanoi problem using
recursion.
9 Write a program to implement Ackermann function using
recursion.
If m=0 then A(m,n) = n+1,
If m>0 and n=0 then A(m,n) = A(m-1, 1)
If m>0 and n>0 then A(m,n) = A(m-1, A(m, n-1))
10 Write a C program to sort a given array in ascending order using
Mergesort technique.
SIGNATURE OF STUDENT........................................................
SIGNATURE OF FACULTY........................................................