# C++ Programming Code Examples

## C++ > Arrays and Matrices Code Examples

### Matrices Multiplication in C++ Code Tutorial

C++ Coding Generating Random Numbers -
Following C++ program generate 100 random numbers using rand() function of stdlib.h. To generate random numbers in C++, we use the function rand() to generate and print random

Triangle is Valid or not if Angles are given -
C Program code to check whether a Triangle is valid or not if angles are given using if else. Input all three angles of triangle in a variable say angle1, angle2 and angle3. Find sum of...

Find Sum of Opposite Diagonal Elements -
C program to read elements in a matrix and find the sum of minor diagonal elements. C program to calculate sum of minor diagonal elements. Input elements in matrix from user

C++ Sample Code Implement Bubble Sort -
Bubble sort algorithm sort data by comparing 2 consecutive numbers. The time Complexity of this algorithm is O(n^2). And compare two consecutive number. Switch values if number

C++ Language Implementations For Stack -
Test if the stack is logically full. Return true if full, false otherwise. Get the "most recently" inserted item in the stack. Does not alter the stack. Return the most recently inserted item

C Programs Calculates the Simple Interest -
Program calculates the simple interest given the principal amount, rate of interest & time. The Formula to calculate the Simple interest is: simple_interest = (p * t * r) / 100 where p...

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 Code Remove Spaces Blanks from String -
C program remove extra spaces, blanks from the string. Removes 'extra blank spaces' from the given string and returns a new string with single "blank spaces" and skip all consecutive