# C++ Programming Code Examples

## C++ > Mathematics Code Examples

### C++ Program to Find HCF of two numbers

C Language Codes Finds Reverse of String -
C Program code Find reverse of a given string using Loop. There are numerous ways to find Reverse of a String. First let us see the easiest method to find Reverse of String. Input string

C Number of Occurrences of an Element in -
Code Count the number of Occurrences of an element in the linked list using recursion. This C Program uses recursive function & finds the occurrence for an element in an Unsorted list.

Code shows how to fork system call works -
C Programming example that shows how fork system call works. Let us now print the current working directory of the child. Now we are in the parent thread. Let is check the

Checks Whether a Number is Prime or Not -
A 'positive integer' which is only divisible by 1 and itself is known as prime number. So 13 is a prime number because it is only divisible by 1 and 13 but, 15 is not prime number because

Calculator Program by use C++ Functions -
A simple C++ Calculator which have different functions for different operations. menu base selection screen using switch statement. Ever operation should have its own function. Code

C Store Information Using Structures with -
C Programming example Store information using structures with dynamically memory allocation. This c program asks user to store the value of noOfRecords and allocates the

C Performing Comb Sort Array of Integers -
C Program to performs Comb sort on array of integers. "Comb Sort" is a comparison sorting algorithm. This sort is 'Exchange sort', similar to 'Bubble Sort'. Function to find the new gap

C Program Computes Factorial of number -
The Factorial of a Positive Number n is given by: factorial of n (n!) = 1*2*3*4...n. Factorial of a negative number doesn't exist. And, the factorial of 0 is 1, 0! = 1. The program takes a