You are on page 1of 1

Faculty of Computers and Information

CS214: Data Structures


Fall 2016

Dr. Marwa M. A. Fattah & Dr. Sarah Nabil


Faculty of Computers and Information

Extra Sheet 3

Note: This sheet is not required to be delivered as assignment.

1. Write a recursive function that prints the numbers 1…n in descending order.
2. Write a recursive function that prints the numbers 1…n in ascending order.
3. Write a function that takes in two numbers and recursively multiplies them together.
4. Write a recursive function convert a decimal number into a binary number, printing the
binary number
5. Write a recursive function to find sum of first n natural numbers.
6. Write a recursive function that finds and returns the minimum element in an array, where
the array and its size are given as parameters.
int findmin(int a[], int n)
7. Write a recursive function that determines whether an array is a palindrome, where the
array and its size are given as parameters.

You might also like