 # C Programming Code Examples

## C > Arrays and Matrices Code Examples

### Program to print reverse array in C

The C Programming Pointers & 2D Arrays - As we know that the one "Dimensional Array" name works as a pointer to the base element of the Array. However in the case "2D Arrays" the logic is slightly different. You can consider

C Finds Sum of Even Numbers from 1 to N - C Program to input upper limit to find sum of even number. Store it in some variable say N. Initialize another variable to store sum with 0 say sum = 0. To find sum of even numbers we

Addition of Two Matrix in C++ Language - To achieve Addition of two matrix we need 2 "Dimensional Array" and add their elements with each other, print result on screen. Enter elements of firts matrix. Enter elements of 2.

Program to find largest array element in C - Finding largest value in an Array is a classic C array program. Code gives you an insight of iteration, array & conditional operators. We iteratively check each element of an array if

C Compute the Sum of Digits in an Integer - C Program take the integer as input. Divide the input integer by 10, obtain its remainder and quotient. Increment the new variable with the remainder got at step 2. Repeat the

C Convert Octal to Hexadecimal Number - C program to input octal number from user and convert to hexadecimal number system. Octal Number System is a base 8 number system. It uses 8 symbols to represent all its

Count Occurence of a Substring in a String - Program takes a string & a substring as input and "counts the occurrence of a substring" in string. Take a String and a Substring as input. Firstly check for the substring in the string. If

Program code to addition of two matrices - Before accepting the Elements Check if no of rows and columns of both matrices is equal. Accept the Elements in Matrix 1 and Matrix 2. Addition of two matrices. Print out the matrix