# C++ Programming Code Examples

## C++ > Sorting Searching Code Examples

### Generate a Random Directed Acyclic Graph DAC for a Given Number of Edges

Simple Class Declaration in C++ language -
C++ language allows us to separate program-specific datatypes through the use of classes. "C++ Classes" define types of data structures and the functions that operate on those data

Program code to Reverse a Given Number -
Take the Number which you have to Reverse as the input. Obtain its quotient & remainder. Multiply the separate variable with 10 & add the obtained remainder to it. Do step 2 again

Finds Factorial of a Number use Recursion -
Program Find the Factorial of a number using 'recursion'. C Program prints the factorial of a number using recursion. 'Factorial' is product of all the number from 1 to the user specified

Increase 1 to all of the given Integer Digit -
Initialize variable sum to zero. Take a number as input and store it in the variable number. Obtain the remainder and quotient of the variable number. Store the remainder in the

Convert Strings to UpperCase use Pointers -
C program to 'convert string' from Lowercase to uppercase string using loop. All characters are represented as an integer value known as "ASCII" value. Where A is represented with 65

C Program Code Calculate Simple Interest -
C code example to input principle amount in some variable say principle and input time in some variable say time. Input rate in some variable say rate. Find simple interest using

C++ Program Finds the Transitive Closure -
C++ Program to find the trnasitive closure of a given graph. In mathematics, the transitive closure of a binary relation R on a set X is the "transitive relation" R+ on set X such that R+

Find an Input Substring in an input main -
C Programming example code to find an input substring in an input main string. The given sub-string is present in the main string. The given sub-string is not present in the...