Tag Archives: C program

C021 A C program to find the Fibonacci series of numbers using recursion

Explanation of FUNCTION: A function is a block of code that has a name and it has a property that it is reusable i.e. it can be executed from as many different points in a C Program as required. Function groups a number of program statements into a unit and gives it a name. This… Read More »

C018 A C program to compute transpose of a matrix

Let’s identify variables needed for this program. Transpose of A matrix which is formed by turning all the rows of a given matrix into columns and vice-verse. The transpose of matrix A is written AT. In this program, we need to save matrices which consists Rows and Columns. To save this we need Two dimensional… Read More »

C017 A C program to print the upper and lower triangle of matrix.

Let’s identify variables needed for this program. In this program, we need to save matrices which consists Rows and Columns. To save this we need Two dimensional ARRAY. Multi dimensional Array is a nothing different than any Array but the only difference is that it has more than one deminsion to it e.g. square has… Read More »

C016 A C program to check if the given matrix is magic square or not.

Let’s identify variables needed for this program. In this program, we need to save matrices which consists Rows and Columns. To save this we need Two dimensional ARRAY. Multi-dimensional Array is a nothing different than any Array but the only difference is that it has more than one dimension to it e.g. square has two… Read More »

A C program to Add two matrices (matrix) or Subtract two matrices (matrix)

Let’s identify variables needed for this program. In this program, we need to save matrices which consists Rows and Columns. To save this we need Two dimensional ARRAY. Multi dimensional Array is a nothing different than any Array but the only difference is that it has more than one deminsion to it e.g. square has… Read More »

C014 An interactive C program that will take as input a set of 20 integers and store them in an array and using a temporary array of equal length, reverse the order of the integers & display the values.

Let’s identify variables needed for this program. In this program, we need several variables to store and compare the values to find the largest and the smallest out of them. Its not recommended to take number of variables declared of the same data type with different names and remembering it. It becomes worst when the… Read More »