Blog

python tutorials and learn python

Created with Sketch.

C Program to Find the Frequency of Characters in a String

C Program to Find the Frequency of Characters in a String This program asks the user to enter a string and a character and checks how many times the character is repeated in the string. Example: Find the Frequency of Characters Output Enter a string: This website is awesome. Enter a character to find the…
Read more

C Program to Find Largest Number Using Dynamic Memory Allocation

C Program to Find Largest Number Using Dynamic Memory Allocation In this program, you’ll learn to use calloc() function to allocate the memory dynamically to find the largest element. Depending upon the number of elements, the required size is allocated which prevents the wastage of memory.  If no memory is allocated, error is displayed and…
Read more

C Program Swap Numbers in Cyclic Order Using Call by Reference

C Program Swap Numbers in Cyclic Order Using Call by Reference This program takes three integers from the user and swaps them in cyclic order using pointers. Three variables entered by the user are stored in variables a, b, and c respectively. Then, these variables are passed to the function cyclicSwap(). Instead of passing the…
Read more

C Program to Access Array Elements Using Pointer

C Program to Access Array Elements Using Pointer This program declares an array of five elements, and the elements of the array are accessed using a pointer. Example: Access Array Elements Using Pointers Output Enter elements: 1 2 3 5 4 You entered: 1 2 3 5 4 In this program, the elements are stored…
Read more

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