What do you mean by recursion? Write down a C function to find out the GCD of two nos. using recursive technique.
Recursion is a programming technique that allows the programmer to express operations in terms of themselves. In C, this takes the form of a function that calls itself.
C function to find out the GCD of two nos. using recursive technique.
#include <stdio.h>
int gcd(int n1, int n2);
int main()
{
int n1, n2;
printf("Enter two positive integers: ");
scanf("%d%d", &n1, &n2);
printf("G.C.D of %d and %d = %d", n1, n2, gcd(n1,n2));
return 0;
}
int gcd(int n1, int n2)
{
if (n2!=0)
return gcd(n2, n1%n2);
else
return n1;
}
Write a C language function to find the in-order successor of the root of a binary tree.
What is the benefit of using arrays of pointers instead of several pointer variables?
Construct an AVL tree using the below list. Show all the steps 12, 11, 13, 10, 09, 15, 14, 18, 7, 6, 5.
Write short notes on the following:
Write a C program to find minimum among three numbers.
What is the Modularity of a Software System ?
Write a C program to convert Centigrade temp into Farenhite temp.
Write a C procram to G.C.D. of two no. using recursion.
Difference between ISO and CMM standards.
Briefly differentiate between CDMA and GSM technologies.