Skip to content

Files

Failed to load latest commit information.

Latest commit

 Cannot retrieve latest commit at this time.

History

History

Chapter 05 — Functions and Recursions

Chapter 5 - Practice Set

  1. Write a program using functions to find the average of three numbers.
  2. Write a function to convert Celcius temperature into Fahrenheit.
  3. Write a function to calculate the force of attraction on a body of mass m exerted by earth. (g=9.8m/S2)
  4. Write a program using recursion to calculate the nth element of the Fibonacci series.
  5. What will the following line produce in a C program: printf(“%d %d %d\n”,a,++a,a++);
  6. Write a recursive function to calculate the sum of first n natural numbers.
  7. Write a program using functions to print the following pattern(first n lines):
      *
    
     ***
    
    *****