List of c++ language function and recursion programming exercises

List of c++ language function and recursion programming exercises


A function or method is basically a block of statements that perform a specific task. For example, you are building an application in C++ language and in one of your program, you need to perform the same task more than once. In such case, you have 2 options:


A) Use the same set of statements every time you want to perform the task

B) Create a function/Method to perform that task, and just call it when you need to perform that task.


Using option (B) is always a good practice and a good programmer always uses functions while writing codes in C++ or any other programming language.


techstudy.org

Kindle Paperwhite High Resolution Display Tablet | Rs. 9999

  1. Write C++ program to check even or odd using functions
  2. Write C++ to check prime and armstrong numbers using function
  3. Write C++ program to find cube of a number using function
  4. Write C++ Program to convert binary number to decimal
  5. Write C++ Program to convert decimal number to binary using function
  6. Write C++ program to find Length of the String by passing String/Character
  7. Write C++ program to print all strong numbers between 2 numbers
  8. Write C++ program to find prime numbers in given range using functions
  9. Write C++ program to find diameter, circumference and area of circle using function
  10. Write C++ program to print perfect numbers between given interval using function
  11. Write C++ program to find power of a number using recursion
  12. Write C++ program to find sum of natural numbers in given range using recursion
  13. Write C++ program to print even or odd numbers in given range using recursion
  14. Write C++ program to find reverse of a number using recursion
  15. Write C++ program to find LCM of two numbers using recursion
  16. Write C++ program to find HCF of two numbers using recursion
  17. Write C++ program to print elements of array using recursion
  18. Write C++ program to find sum of array elements using recursion
  19. Write C++ program to generate nth fibonacci term using recursion
  20. Write C++ program to find factorial of a number using recursion
  21. Write C++ program to check palindrome number using recursion
  22. Write C++ program to find maximum and minimum elements in array using recursion

     






Related Topics



Responses




Popular Posts

Facebook

Founded in 2016, Tech Study passionately delivers stylish and dynamic innovative information to programmer and technology lovers. http://www.techstudy.org/.