 # C++ Programming Code Examples

## C++ > Data Structures Code Examples

### Do you want a diomond

C Performs Quick Sort on A Set of Entries - C program to using recursion, performs quick sort. A 'Quick Sort' is a sorting algorithm with 'complexity of O(nlogn)'. It is used for sorting Numbers, Structure, Files. Enter the number

Checks If the Substring is Present in String - C Program 'checks the substring' is present in a given string. Program accepts both string & substring. Then checks whether the substring is present in the string. Enter search substring

C++ Sample Code Implement Bubble Sort - Bubble sort algorithm sort data by comparing 2 consecutive numbers. The time Complexity of this algorithm is O(n^2). And compare two consecutive number. Switch values if number

C++ language Declare a Variable as Static - In the C++ Programming, The static keyword allows a variable to maintain its value among different function calls. If the value of a static variable changes when the variable has been

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

C++ Sample code Linear Search Algorithm - Linear search is method for searching a value within an array. It 'sequentially' checks one by one of the arrays for the 'target element' until 'match is found' or until all the elements have

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'.

Program code to addition of two matrices - Before accepting the Elements Check if no of rows and columns of both matrices is equal. Accept the Elements in Matrix 1 and Matrix 2. Addition of two matrices. Print out the matrix