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.
a) Define big O notations.
b) \( {T(n) = 4n^{2}+3n \log_{}{n} } \), express T( n ) in Big( O ) notations.
Construct an AVL tree using the below list. Show all the steps 12, 11, 13, 10, 09, 15, 14, 18, 7, 6, 5.
Briefly discuss about Critical Path Method (CPM)
Discuss about SCHEDULING
Describe structured analysis and structured design.
Write a C program to convert decimal no. to binary.