# C++ Programming Code Examples

## C++ > Pyramid Patterns Code Examples

### Program to print pyramid using numbers

Program code to addition of two matrices -
Before accepting the Elements Check if no of rows and columns of both matrices is equal. Accept the Elements in Matrix 1 and Matrix 2. Addition of two matrices. Print out the matrix

Code Convert a Number Decimal to Binary -
Find a Binary equivalent of a decimal number entered by the user, using recursion. The user has to enter a 'decimal' which has a base 10 & this program evaluates the binary equivalent

C Programming Codes Reverse an Integer -
C Reversing an integer, takes an integer input from the user. Then the while loop is used until n != 0 is false. In each iteration of while loop, the remainder when n is divided by 10

QuickSort For Files in The C Programming -
First, create a file to sort, write unsorted data to disk and now, sort the file. Sorting disk file. A Quicksort for files. First read in record i and j and then write them back in opposite slots.

C++ Programs to Implements D-ary-Heap -
Filling up 'heap' with the array. A Function to check if heap is empty. Function to get index parent of i. Function to get index of k th child of i. Function to find least element. Function

Find ith Largest Number from a Given List -
It is an improvement in BST by adding 2 more key functions - 'rank()' and 'select()'. The time complexity of Order-Statistic tree generation is O(n+n*log(n)). Once the tree is constructed

C++ Codes Solve Tower of Hanoi Problem -
C++ program displays the iterative solution to the Tower of Hanoi problem. Tower Of Hanoi consists of 'three rods' and a number of disks of different sizes which can "Slide Onto" any

C Program to Open, Read & Close the File -
C various file opening modes: File is opened using fopen() c function, while opening you can use any of the following mode as per the requirement. Mode "r": It is a read only mode,