 # C++ Programming Code Examples

## C++ > Computer Graphics Code Examples

### Program to find the Area of any Triangle having values of three sides

Getting a User Input as String in The C++ - This can be considered as inefficient method of reading user input, why? Because when we read the user input string using cin then only the "First word of the String" is stored in char

Most Significant Bit (MSB) of a number is - In C programming language we use bitwise AND & operator to check status of any bit. Bitwise AND operation evaluate each bit of resultant value as 1, if corresponding bit of...

C Find the Sum of First n Natural Numbers - We will see 2 C programs to calculate the sum of natural numbers. In the first C program we are using For Loop for find the sum and in the second program we are doing the same using

C Code Traverse the Tree Non-Recursively - C language code, using iteration, searches for a given node in a tree. The tree we have used is the binary search tree. A binary search tree follows a concept of nodes whose numbers...

C Program to Find Smallest array element - Finding smallest value in an Array is a classic C array program. C code gives you an insight of iteration, array and conditional operators. We iteratively check each element of array...

Using Binary Search Technique & Displays - To perform "Binary Search" in 'C++', enter the array size, enter the array elements. Now ask to enter an element that is going to be search to "start searching" that element using binary

Check Whether Number is Strong Number - How to check Strong Numbers using loop in C. What is Strong number? Strong number is a special number whose sum of factorial of digits is equal to the original number. 145 is

Increment Operator Decrement Operator - Basic "arithmetic operators" are +, -, *, /, %. "Increment operator" is ++ and "decrement operator" is --. These operators can be used as before the variable (prefix) and after the