Category: C program

python tutorials and learn python

Created with Sketch.

C Program to Multiply two Matrices by Passing Matrix to a Function

C Program to Multiply two Matrices by Passing Matrix to a Function In this example, you’ll learn to multiply two matrices and display it using user defined function. This program asks the user to enter the size of the matrix (rows and column). Then, it asks the user to enter the elements of those matrices…
Read more

C Program to Find Transpose of a Matrix

C Program to Find Transpose of a Matrix This program takes a matrix of order r*c from the user and computes the transpose of that matrix. In this program, user is asked to entered the number of rows r and columns c. The value of r and c should be less than 10 in this…
Read more

C Program to Multiply to Matrix Using Multi-dimensional Arrays

C Program to Multiply to Matrix Using Multi-dimensional Arrays This program takes two matrices of order r1*c1 and r2*c2 respectively. Then, the program multiplies these two matrices (if possible) and displays them on the screen. To multiply two matrices, the number of columns in the first matrix should be equal to the number of rows…
Read more

C Program to Add Two Matrices Using Multi-dimensional Arrays

C Program to Add Two Matrices Using Multi-dimensional Arrays This program takes two matrices of order r*c and stores them in a two-dimensional array. Then, the program adds these two matrices and displays them on the screen. In this program, the user is asked to enter the number of rows r and columns c. The…
Read more

C Program to Calculate Standard Deviation

C Program to Calculate Standard Deviation This program calculates the standard deviation of 10 data using arrays. This program calculates the standard deviation of an individual series using arrays. Visit this page to learn about Standard Deviation. To calculate the standard deviation, calculateSD() a function is created. The array containing 10 elements is passed to…
Read more

C Program to Find Largest Element in an Array

C Program to Find the Largest Element in an Array This program takes n number of elements from the user (where n is specified by the user) and stores data in an array. Then, this program displays the largest element of that array using loops. Example: Display the Largest Element of an array Output Enter…
Read more

C Program to Calculate Average Using Arrays

C Program to Calculate Average Using Arrays This program takes n number of elements from the user (where n is specified by the user), stores data in an array, and calculates the average of those numbers. Source Code to Calculate Average Using Arrays Output Enter the numbers of elements: 6 1. Enter number: 45.3 2.…
Read more

C program to calculate the power using recursion

C program to calculate the power using recursion This program calculates the power of a number using recursion. Example: Program to calculate the power using recursion Output Enter base number: 3 Enter power number(positive integer): 4 3^4 = 81 Example C program to calculate the power of a number using recursion: In this program, we…
Read more

C program to Reverse a Sentence Using Recursion

C program to Reverse a Sentence Using Recursion This program takes a sentence from the user and reverses that sentence using recursion. This program does not use string to reverse the sentence or store the sentence. Example: Reverse a sentence using recursion Output Enter a sentence: margorp emosewa awesome program This program first prints “Enter…
Read more

C Program to Convert Binary Number to Octal and vice-versa

C Program to Convert Binary Numbers to Octal and vice-versa In this example, you will learn to convert binary numbers to octal and octal numbers to binary manually by creating a user-defined function. Example 1: Program to Convert Binary to Octal In this program, we will first convert binary numbers to decimals. Then, the decimal number…
Read more