Threaded Binary Tree and its implementation in C
Threaded Binary Trees are those in which the NULL right pointers of all nodes are THREADED to its immediate inorder successor in the Binary Tree. Such...
Traversing a Binary Tree in C
There are generally 3 traversal strategies for Binary Trees – INORDER, PREORDER and POSTORDER. For eg:, the inorder, preorder and postorder traversal of an expression tree...
C program implementing Binary Tree Search to find duplicates of a file
A Binary Search is such a Binary Tree in which the info field of any of the nodes to the left of a particular node nd...
Binary Tree representation and Primitive Operations on a Binary Tree in C
Binary Trees are one of the core data structures used in any programming language to implement complex systems. C programming language offers various binary tree...
C program to print sum up-to each individual preceding number until the entered number
Here is a C program which accepts an integer and prints out sum from 1 to 1, 1 to 2, 1 to 3 …… 1...
C program for Hailstones series
Hailstones is a sequence of numbers that could be generated from any positive number by performing a specific operation on it until it reaches 1....
C program to generate random numbers in any range
Here is a C program to generate random numbers between any range of two digit numbers – #include #include main(){ int s, a, b, n,...
for loops in C
The ‘for’ loop is another important looping structure which could replace ‘while’ and ‘do .. while’ loops. It has a special feature that the initialization,...
C program to test for a prime number
Below is a C program to test for a prime number – main(){ float n, count = 0; i = 3; a; printf("\nEnter any number...
C program to implement Russian Peasant
Here is a C program that I wrote years back to implement Russian Peasant method of an interesting multiplication technique – main(){ int a, b,...