 # C++ Programming Code Examples

## C++ > Sorting Searching Code Examples

### Program to Find Maximum Element in an Array using Binary Search

C++ Multiply Two Matrices use 2D Arrays - C++ Code is very simple it takes input in two 2D arrays each with size of 2X2. After taking the input program "multiply two matrix" in 3 nested for loops. Size of arrays is defined use

Code Checks Even or Odd using Functions - Program input a number from user and check whether given number is Even or Odd using functions. Declare function to find even odd. First give a meaningful name to our function,

Generating Random Numbers by Multiply - C++ Program to generate Random Numbers using Multiply with 'Carry' method. multiply-with-carry ("MWC") is a method invented by 'George Marsaglia' for generating sequences

Program to find largest array element in C - Finding largest value in an Array is a classic C array program. Code gives you an insight of iteration, array & conditional operators. We iteratively check each element of an array if

C++ Language Implementations For Stack - Test if the stack is logically full. Return true if full, false otherwise. Get the "most recently" inserted item in the stack. Does not alter the stack. Return the most recently inserted item

Display the Nodes of Linked list in Reverse - Program to display the nodes of a Linked List in Reverse without using Recursion. Program, using iteration, Displays Linked list in reverse. Linked list is an ordered set of data elements,

Finding the Edge Connectivity of a Graph - C++ Program to find edge connectivity of a graph. An edge in an undirected connected graph is a bridge if removing it disconnects the graph. For a "disconnected undirected"

C++ Finding Transitive Closure of a Graph - Displaying the 'transitive closure matrix' of a graph. The reachability of a particular node 'i' towards all node pairs ('i','j') is known as the transitive closure of a graph. So this matrix is