# C++ Programming Code Examples

## C++ > Sorting Searching Code Examples

### Check if any Graph is Possible to be Constructed for a Given Degree Sequence

C++ Program Coding Multiply 2 Numbers -
In this c++ program, user enter two numbers ('floating point numbers'). Then, the product of those two numbers is 'stored' in a variable and displayed on the screen. The 2 numbers

C Count Trailing Zeros in a Binary Number -
How to find total number of trailing zeros in any given number using bitwise operator in C programming. Write a C program code input any number from user and count number of...

Program Print Fibonacci Series in a Range -
Fibonacci series is a series of numbers where the current number is the sum of previous 2 terms. For Example: 0, 1, 1, 2, 3, 5, 8, 13, 21,... Here c is the current term, b is the n-1th term

Find The Perfect Number In C++ language -
For example 6 is Perfect Number since divisor of 6 are 1, 2 and 3. Sum of its divisor is 1 + 2+ 3 =6 and 28 is also a 'Perfect Number' since 1+ 2 + 4 + 7 + 14= 28. Other 'Perfect Numbers': 496

Program to Find Largest Element of Array -
To find the "Largest Element", the first two elements of array are checked and largest of these two element is placed in arr[0]. Then, the first and third elements are checked and

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

C++ Program to Find LCM of two Integers -
Examples on different ways to calculate LCM ("Lowest Common Multiple") of two integers using loops and decision making statements. "LCM of two integers" a and b is the smallest

C++ Programs Performing Uniform Binary -
Implement to binary search on a sorted array. For the mid index value of any of a 'Subarray', instead of calculating refer Lookup Table. It is an improvement in 'Binary Search' since table