# C++ Programming Code Examples

## C++ > Conversions Code Examples

### Convert a given binary number by user into a equivalent decimal number.

C Program to Count Words, Digits, Vowels -
Program code count number of words, digits, vowels using pointers. Program code Finding number of words, blank spaces, digits, special symbols, vowels using pointers. Counting the

Program Code to Selection Sort Algorithm -
The 'smallest element' is exchanged with the first element of the unsorted list of elements. The "second smallest element" is Exchanged with the 'second element' of the unsorted list

C Program code to Subtract two matrices -
C language read elements in two matrices and find the difference of two matrices. Subtract two matrices in C. Elements of two matrices can only be subtracted if and only...

C++ Program to Implement Ternary Tree -
C++ program implements the ternary tree, is a tree data structure in which each node has at most three "child nodes", distinguished as "left", "mid" and "right". Nodes with children

Code Converts Binary Number to Decimal -
C language code to convert binary to decimal number system. The Binary number system is base 2 number system & uses only 2 symbols to represent all its numbers i.e. 0 and 1. Input

Implement Dijkstra's Algorithm Using Set -
This is a C++ Program to find "shortest path". Dijkstra's algorithm is very similar to Prim's algorithm for minimum spanning tree. Like "Prim's MST", we generate a SPT with given

Code Generates All Possible Combinations -
Algorithm print all the 'possible combination' of each length from the given array. The time complexity of this algorithm is 'O(n*(2^n))'. A function to print all 'Combination of a Length'

Sum of Natural Numbers using Recursion -
C Program find the sum of Natural Numbers using recursion. The 'Positive Numbers' 1, 2, 3... are known as natural numbers. Program below takes a positive integer from the user