 # C++ Programming Code Examples

## C++ > Mathematics Code Examples

### There are two different functions to get the absolute value of an integer

Convert Binary Code of a Number into its - C program to using recursion, evaluates the gray code equivalent of a binary number. A gray is also represented using 0s and 1s. The speciality of gray code is that only one bit is

C Find the Areas of Different Geometrical - C Program code finds the Areas of different Geometrical Figures. The program is menu driven program. This has 4 options that can be choosen by the user. Area of Circle, Area

Header File for Stack in the C++ Language - Remove most recently inserted item. Return most recently inserted item. Return, remove most "recently inserted" item. Return true if empty; else false. Return true if 'full' and else

C Returns a Pointer to the first occurrence - C programming code sample about returns a pointer to the first occurrence of str2 in str1 or a null pointer if there str2 is not part of str1. It returns a null pointer if no match is...

C Code Locate Highest Lowest nr in Array - C Program example Return the largest of the two passed numbers. Return smallest of the two passed numbers. Load some random values into the array. Print set of numbers.

C Code Finds the Sum of all Nodes in Tree - C Program finds the sum of all nodes in a tree such that any node is sum of values at left and right sub tree. Function to find depth of a tree. Function to modify the tree. Function to

C++ Finds All Roots of Quadratic Equation - Program accepts "coefficients" of a quadratic equation from the user and displays the roots (both real and complex roots depending upon the discriminant). 'ax^2+bx+c = 0' (where a, b,

C Calculate the Sum of the Array Elements - C Program code calculates the sum of array elements using pointer. The program uses the pointer to traverse the array and adds up the element values there. C program to read