AAQIB ANAYAT
-
write a c program to print diagonals of a matrix
C program to print diagonal elements of a matrix? #include<stdio.h> int main(){ int array1[10][10],i,j,m,n,sum = 0; printf("Enter no. of rows…
Read More » -
write a c program to multiply two matrix
C program to multiply two matrices? #include <stdio.h>#include <conio.h>main(){int i, j, k;int rows1, cols1, rows2, cols2, res_rows, res_cols;int mat1[5][5], mat2[5][5],…
Read More » -
write a c program to transpose matrix
C program to transpose/inverse a matrix? #include <stdio.h>#include <conio.h>main(){int i, j, mat[3][3], transposed_mat[3][3];printf("n Enter the 9 elements of the matrix…
Read More » -
write a c program to add two matrix
C program to add two matrix into third matrix? #include <stdio.h>main(){ int r, c, a[100][100], b[100][100], sum[100][100], i, j;…
Read More » -
write a c program to copy elements of one array to another
C program to copy elements of one array to another array? #include<stdio.h> main() { int arr1[30], arr2[30], i, num; printf("nEnter…
Read More » -
write a c program to megre two arrays into third array
C program to merge two arrays into third array? #include<stdio.h> main(){ int aSize, bSize, mSize, i, j; int a[10], b[10],…
Read More » -
write a c program to implement bubble sort on an array
Bubble sort #include <stdio.h>main(){ int a[100], number, i, j, temp; printf("n Please Enter the total Number of Elements : ");…
Read More » -
write a c program to implement insertion sort on an array
Insertion sort #include <stdio.h>main(){ int n, array[1000], c, d, t, flag = 0; printf("Enter number of elementsn"); scanf("%d", &n);…
Read More » -
write a c program to implement selections sort on an array
Selection sort #include <stdio.h>main(){ int array[100], n, c, d, position, t; printf("Enter number of elementsn"); scanf("%d", &n); printf("Enter %d integersn",…
Read More » -
write a c program to reverse the elements of an array
C program to reverse the elements of an array #include <stdio.h>main(){ int n, loop, a[100]; printf("Enter the number of elements…
Read More » -
write a c program to find greatest element of an array
C program to find greatest element of an array #include<stdio.h>#include<conio.h>void main(){ int arr[10]; int size,large,loop,search; printf("Enter the size of array…
Read More » -
write a c program to find smallest element of an array
C program to find smallest element of an array #include<stdio.h>#include<conio.h>void main(){ int arr[10]; int size,small,loop; printf("Enter the size of…
Read More » -
write a c program to implement array of structure
C program to implement array of structure #include<stdio.h> struct student { char name[20]; char roll[20]; int mks;} std[10], temp; void…
Read More » -
write a c program to store details or record of a student using structure
C program to store details or record of a student using structure? Structure : Structure is a user defined data…
Read More » -
write a c program to calculate sum of array elements using pointers
#include<stdio.h>#include<conio.h>main(){ int numArray[10]; int i,n, sum = 0; int *ptr; printf("nEnter the size of array : n"); scanf("%d",&n); for (i…
Read More »