Skip to main content

Posts

Showing posts from February, 2019

WAP to read the two matrices and multiply the two matrices in C

WAP to read the two matrices and multiply the two matrices             #include<stdio.h>             #include<conio.h>             void main( )             {                         int x[50][50],y[50][50],z[50][50],i,j,k,m,n,p,q;                         clrscr();                         /*read the first matrix*/                  ...

Wap to read the two arrays and find the sum in C

Wap to read the two arrays and find the sum in "C"             #include<stdio.h>             #include<conio.h>             void main( )             {                                  int x[50][50],y[50][50],z[50][50],i,j,m,n;                         clrscr();                         /*read the first matrix*/            ...

Write a 'c program to read the matrix and find its transpose.

Write  program to read the matrix and find its transpose. #include<stdio.h> #include<conio.h> void main() { int x[50][50],y[50][50],i,j,m,n; clrscr(); /*read the matrix */ printf("\nEnter the value of  m and n :"); scanf("%d %d",&m,&n); for(i=0;i<m;i++) { for(j=0;j<n;j++) { printf("\nEnter the element :"); scanf("%d",&x[i][j]); } } /*display the matrix*/ clrscr(); printf("\nOriginal Matrix is : \n"); for(i=0;i<m;i++) { for(j=0;j<n;j++) { printf("%d\t",x[i][j]); } printf("\n"); } /*find the transpose */ for(i=0;i<m;i++) { for(j=0;j<n;j++) { y[j][i]=x[i][j]; } } /*print the transpose */ printf("\n\n Transpose   : \n"); for(i=0;i<n;i++) { for(j=0;j<m;j...

Write a 'c' program to read and display the 2-d array

 R ead and display the 2-d array #include<stdio.h> #include<conio.h> void main() { int x[50][50],i,j,m,n; clrscr(); /*read the matrix */ printf("\nEnter the value of  m and n :"); scanf("%d %d",&m,&n); for(i=0;i<m;i++) { for(j=0;j<n;j++) { printf("\nEnter the element :"); scanf("%d",&x[i][j]); } } /*display the matrix*/ for(i=0;i<m;i++) { for(j=0;j<n;j++) { printf("%d\t",x[i][j]); } printf("\n"); } getch(); } c programming language,c programming software,c programming download,c programming online,c programming examples,c programming tutorial,c programming code c programming w3schools,c++ compiler download,turbo c compiler,online c compiler,c compiler for windows,c++ compiler,online compiler online c++ compiler,gdb compiler,c programming practice questions pdf,c programming practice onlin...

2-D array Definition and Syntax

Double - Dimension Array 2-D ARRAY  In the case of the double dimension arrays or 2d arrays , we have the concept of arranging the elements in the tabular form, i.e. , in rows and columns. The rows are horizontal and the columns are vertical. The general form of defining the 2d array is , datatype arrayname[nos of rows][nos of columns]; e.g. int x[5][3]; This statement will declare the 2-d array containing the 5 rows and 3 columns, and the array will be declared with the name x. c programming language,c programming software,c programming download,c programming online,c programming examples,c programming tutorial,c programming code c programming w3schools,c++ compiler download,turbo c compiler,online c compiler,c compiler for windows,c++ compiler,online compiler online c++ compiler,gdb compiler,c programming practice questions pdf,c programming practice online,c programming coding questions and answers pdf,100 c programming exercises pdf c...

WAP to read two arrays and find the insertion

WAP to read two arrays and find the insertion in "C" Array 1 : 5,10,15,20,25,30 Array 2 : 10,20,45,60,70 Array 3 : 10,20 #include<stdio.h> #include<conio.h> void main() { int x[50],y[50],z[50],i,j,k,m,n; clrscr(); /*read the array */ printf("\nEnter the value of m:"); scanf("%d",&m); for(i=0;i<m;i++) { printf("\nEnter the element :"); scanf("%d",&x[i]); } /*read the second array */  printf("\nEnter the value of n:"); scanf("%d",&n); for(j=0;j<n;j++) { printf("\nEnter the element :"); scanf("%d",&y[j]); } /*find the intersaction*/ k=0; for(i=0;i<m;i++) { for(j=0;j<n;j++) { if(x[i]==y[j]) { z[k]=x[i]; k++; } } } /* display the insertion of two arrays*/ for(i=0;i<k;i++) { pr...