# C++ Programming Code Examples

## C++ > Sorting Searching Code Examples

### Program to Compute Combinations using Factorials

Check Whether the Number is Palindrome -
If the reversed integer is equal to the integer then, that number is a palindrome if not that number is not a palindrome. In program, use is asked to enter a 'positive number' which is

Insert Element in Array at certain position -
Enter array size, array elements, element to be insert, enter the index where to insert the desired element in the array, so this program insert the desired element and displaying the

Triangle given the lengths of its sides in C -
C Programming code gives all details of a Triangle given the lengths of its sides. Enter the lengths of the three sides of the triangle. S is the semiperimeter of the triangle. D is...

C Program Codes Parse Custom httpd Log -
C Parse custom httpd log. Get unresponsibly wild with pointers. Grow a tree for world peace. Allocate mem for ptr array. Read btree into array. Qsort the array. Print the result.

Count Number of non leaf nodes of a tree -
C create a new node with the data from the user. Check for root node and then create it. Search for the appropriate position to insert the new node. Display and count the sum of

Display the contents of structure elements -
C Program code to use structure within union & display the contents of structure elements. Problem statement: Create one structure and declare it inside union. Then accept values for

Count total number of notes in an amount -
C program input amount and print minimum number of notes (Rs. 500, 100, 50, 20, 10, 5, 2, 1) required for the amount. There any many optimal algorithms to solve given problem.

Print only Odd Numbered Levels of a Tree -
Two functions in this method. One is to print all nodes at a given level ("printGivenLevel"), and other is to "print level order traversal" of the tree ("printLevelorder"). printLevelorder