# C++ Programming Code Examples

## C++ > Strings Code Examples

### Repeatedly Search the Same Text (such as Bible by building a Data Structure)

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.

C Convert Binary to Hexadecimal Number -
C Program to input binary number from user and convert to hexadecimal number system. Binary Number System is a base 2 number system. Binary number system use only two

Randomized Primality Testings Algorithm -
Method that implements the basic primality test. If witness doesn't return 1, n is definitely composite. Do this by computing a^i (mod n) and looking for "non-trivial" square roots of 1

Program to Create a Random Graph Using -
This algorithm randomly assigns a number of vertexes and edges of the graph. It connects vertexes randomly & generates cyclic, acyclic or disconnected undirected graphs. Generate

Function to Return a String representation -
C Convert an integer to a string. Caller must allocate string array. Function returns string to allow. Use of the function in an expression. Generate digit characters in reverse order...

Fibonacci Sequence up to Certain Number -
Program to generate Fibonacci Sequence up to a certain number. The Fibonacci sequence is a series where the Next term is the Sum of Pervious 2 terms. The First Two terms of the

Addition Operation use Bitwise Operators -
C++ Program perform addition using bitwise operators. Using "AND" and "XOR" operators addition can be done, where carry is given by "AND" between two operands and result can

C++ Language Do While Loop Statements -
The statement is executed, then expression is evaluated. If it is true, statement is evaluated again, and so on. When 'expression' becomes false, the 'loop terminates'. Experience shows