# C++ Programming Code Examples

## C++ > If Else and Switch Case Code Examples

### C++ Program to Check Leap Year

Lets Learn String Functions in C Language -
Find the "Length of str1". Increment count till we reach the Terminating character. Find the "Length of str2". Check that we have enough 'space' for both strings. Copy 2. string to end

Generating Random Numbers by Multiply -
C++ Program to generate Random Numbers using Multiply with 'Carry' method. multiply-with-carry ("MWC") is a method invented by 'George Marsaglia' for generating sequences

C++ Programming Subtract Two Matrices -
Program ask to the user to enter any two 3*3 array elements to subtract them i.e., Matrix1 - Matrix2, then display the "subtracted" result of the two matrices ( Matrix3 ) on the screen:

C Implement Binary Tree using Linked List -
Program implements binary tree using linked list. Binary Search tree is binary tree in which each Internal Node x stores an element such that the element stored in the left subtree of

C Code Perform all Arithmetic Operations -
C program input two numbers and perform all arithmetic operations. How to perform all arithmetic operation between two numbers in C programming. C program to find sum,...

Find Twos Complement of Binary Number -
C program code to input binary number from user and find twos complement of the binary number. Twos complement of N-bit number is defined as the complement with respect to

Code Find Prime Numbers in given Range -
C Program code Find out the prime numbers between 1 to 100, 100 to 999... Input a range, for e.g. if you want the Prime Numbers from 100 to 999 then enter numbers 100 and 999...

Program to Find Inverse of a Graph Matrix -
C++ code displays the Gauss Jordan method of computing inverse of a matrix. it proceeds with row by row "reduction of matrix" to unit matrix column-wise. First enter the order of