# C++ Programming Code Examples

## C++ > Mathematics Code Examples

### C++ calculator code for beginner

C Programming Sample Reading the Files -
To read the file in C Language, we must open it first using any of the mode, for example if you only want to read the file then open it in "r" mode. Based on the mode selected during

The C++ Shortest path program using STL -
Process a request; return false if end of file. A simple main that reads a file given by argv[1] and then calls "processRequest" to compute shortest paths. Then 'Skimpy' error checking

C++ program for Complex Numbers using -
Class for addition, subtraction, multiplication and division for 'complex numbers'. Class has 4 functions to perform arithmetic operations. It takes 2 "complex numbers" input from user

C++ Multiply two Matrices Passing Matrix -
Learn to "multiply two matrices" and display it using user defined function. This program asks user to enter the size of the matrix (rows and columns). Then, it asks the user to enter

Program Find the Number of Occurrences -
'Binary Search tree' for a given unsorted data array & maintain an additional count variable. If any 'Element is Repeated' then increase the count of that 'Node'. Proceed with the search

Pointer Simple Program Pass by Reference -
C++ Language program sample which passes a "Reference" to a Function and Function has a 'pointer' as argument. Keep the return type void & display result in main body. Apply any

Input Number & Check it is Palindrome or -
C program input number and check number is Palindrome or not using Loop. Palindrome number is such number which when reversed is equal to the original number. 121, 12321,...

C Count Trailing Zeros in a Binary Number -
C language input any number from user and count number of trailing zeros in the given number using bitwise operator. How to find total number of trailing zeros in any given...