# C++ Programming Code Examples

## C++ > Sorting Searching Code Examples

### Generate All the Set Partitions of n Numbers Beginning from 1 and so on

Finds the Sum of ASCII Values of All Chars -
Program takes a 'string as input' and finds the sum of 'ASCII values' of all characters in given string. Take a string as "input & store" it in the array string[]. Initialize the variable sum to '0'.

C Check Whether a number is Even or Odd -
C Program code to Check Whether a number is even or odd using if else. A number exactly divisible by 2 leaving no remainder, is known as even number. Any number modulo divided

Implementation for Linked List in the C++ -
Test if the list is logically empty. Return true if empty, false otherwise. Make the list logically "empty". Return an 'iterator' representing the header node. Return an iterator representing

Implement A Heuristic to Find the Vertex -
Problem takes E edges as input and outputs vertex cover of the graph, implementing the following heuristic. There is no "Polynomial" time algorithm "invented up to date" to find

Code find power of number using for loop -
C program to find power of a number using for loop. Input base and exponents from user. Store it in two variables say base and expo. Declare & initialize another variable to store

C Convert Binary to Octal Number System -
In C program user is asked to enter the binary number and the program then converts that binary number to the octal number by calling a user defined function. To understand this...

Mine Sweeper Game C Programming code -
Graphic program about Mine Sweeper. Put mines in random blocks. Put mines value in other blocks. Sets view port to the play area only. Puts F tag in Array. Determine current

Display message by format with the printf -
The number of characters actually printed. A negative value indicates failure. Hexadecimal output in the form. Signed decimal integers. Scientific notation. Decimal floating point.