# C++ Programming Code Examples

## C++ > Pyramid Patterns Code Examples

### Program to Print Diamond of Stars

Program Shows How a Pointer is Declared -
There are several other things that we can do with "pointers", we have discussed them later in this guide. Now, we just need to know how to link a pointer to the 'Address of a Variable'.

C Language Program Implement Cyclesort -
C Program implements 'Cyclesort'. Cycle sort is an in-place, unstable 'Sorting Algorithm', a comparison sort that is theoretically optimal in terms of the total number of writes to the

Program find Reverse of Negative number -
Write a recursive function in C Programming to find reverse of a number. To find reverse of a negative number use the logic for positive number reverse which I mentioned above. In

C++ Sample Calculate Power of a Number -
Program takes two numbers (a 'base number' and an 'exponent') and Calculates the Power. The technique works only if the exponent is a positive integer. If you need to find the power

C++ language Program to Implement Trie -
Program demonstrates the implementation of Trie. Trie node base declaration. Trie node declaration. Trie class declaration. Insert trie node. Destroy trie. Trie traversal. Clustering

Implement Randomized Binary search tree -
Program demonstrates the implementation of Randomized Binary Search Tree. Function to check if tree is empty. And then make the tree logically empty. Functions to insert data.

Counts Leading Zeros in a Binary Number -
Find total leading zeros of a given number (in binary representation) using bitwise operator in C programming. Write a C program code to input any number from user and find total

Print Nth Node from the last of Linked list -
C Language code to prints the Nth node from the Last Node of a Linked List. The approach used is to first point a pointer to a node which is N nodes ahead from the head. Then, move