# C++ Programming Code Examples

## C++ > Arrays and Matrices Code Examples

### C++ Program to Pass Array in Function

Performs LU Decomposition of any Matrix - C++ Program perform LU Decomposition of a matrix. LU decomposition factors a matrix as the product of a Lower Triangular Matrix and an upper 'triangular matrix'. Code sometimes

C++ Mathematic Code Add Two Numbers - In this C++ program, user is asked to enter 2 integers. Then, the sum of those 2 integers is stored in a variable and 'displayed' on screen. The variables firstNumber & secondNumber

C programming code right rotate an array - C code to right rotate an array by n position. How to right rotate an array n times in C. Logic to rotate an array to right by n position in C program. Read elements in an array say

Implement Doubly Linked list using Singly - Program implements doubly linked list using singly Linked List. It makes use of 2 pointers, one points at the current node, other points at the head and when user requests to move

C++ Finds Maximum Element in an Arrays - Construct "Binary Search" tree for "unsorted" data array. For the 'Maximum element' move the pointer to the rightmost child node. This value will be the minimum value among data.

Finds the Number of Elements in an Array - Formula that we are using to find the number of elements is common for all types of array. In this example, we have an array of double data type, however you can use the same...

C Program Codings Concatenate 2 Strings - Program to Concatenate two strings in single string. Concatenation of two strings is simple copying a string to another. To concatenate 2 strings str1 & str2, you will copy all characters

C Converting Roman Numbers to Decimal - Take a roman number as input and store it in the array roman_Number. In the C function digit(), define the value of each digit of the roman number inside the switch statement