Free Cources

Your blog category

Topic-26: Types of recursion

Types Of Recursion: Direct Recursion Indirect recursion Tail Recursion Non-Tail Recursion Linear and Tree Recursion 1.Direct Recursion: If a function calls the same function again is called as direct recursion . int fun(){ //Statement fun(); } Code: #include<stdio.h> int fun(int n){ if(n==0) { return n; }  printf(“%dn”,n);  return fun(n-1); } int main() { fun(5); return

Topic-26: Types of recursion Read More »

Topic-23: WAWR

With argument with return type(WAWR): A “with argument, with return type” function is a type of function in programming that takes one or more arguments as input and returns a value upon execution. Here’s the definition syntax for a with argument, with return type function in C: return_type function_name(data_type parameter1, data_type parameter2, …) { //

Topic-23: WAWR Read More »