answersLogoWhite

0


Best Answer

#include<stdio.h> #include<conio.h> int main() { int n,m,i,j,k; int a[38][38],b[38][38],p[38][38]; printf("\nEnter the number of rows and coloumns "); scanf("%d %d",&n,&m); printf("\nEnter the elements of first matrix "); for(i=0;i<n;i++) { for(j=0;j<m;j++) { scanf("%d",(*(a+i)+j)); } } printf("\nMatrix is "); for(i=0;i<n;i++) { printf("\n"); for(j=0;j<m;j++) { printf("%d",*(*(a+i)+j)); printf("\t"); } } printf("\nEnter the elements of second matrix "); for(i=0;i<n;i++) { for(j=0;j<m;j++) { scanf("%d",(*(b+i)+j)); } } printf("\nMatrix is "); for(i=0;i<n;i++) { printf("\n"); for(j=0;j<m;j++) { printf("%d",*(*(b+i)+j)); printf("\t"); } } printf("\nAfter ");

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

#include<stdio.h>

int main()

{

int mat1,mat2;

char

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write the program in c language for the addition of two matrices using pointer?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is matrix programming in C programming?

C Examples on Matrix OperationsA matrix is a rectangular array of numbers or symbols arranged in rows and columns. The following section contains a list of C programs which perform the operations of Addition, Subtraction and Multiplication on the 2 matrices. The section also deals with evaluating the transpose of a given matrix. The transpose of a matrix is the interchange of rows and columns.The section also has programs on finding the trace of 2 matrices, calculating the sum and difference of two matrices. It also has a C program which is used to perform multiplication of a matrix using recursion.C Program to Calculate the Addition or Subtraction & Trace of 2 MatricesC Program to Find the Transpose of a given MatrixC Program to Compute the Product of Two MatricesC Program to Calculate the Sum & Difference of the MatricesC Program to Perform Matrix Multiplication using Recursion


C program pointers to pointers examples?

Pointer to Pointer is a double pointer, denoted by (**). Pointer stores the address of the variable and pointer to pointer stores the address of a pointer variable and syntax can be given as int **ptr2ptr;


What is null pointer assignment?

This error message means that somewhere in your program you have used a pointer-varible containing NULL-value. (Within an actual OS it with stop the program immediately, but in MS-DOS it doesn't.)


Function of a program counter?

Program Counter is just a synonim for Instruction Pointer.


Why pointer is callded jewel of c language?

a pointer is a derived data type in c. pointers are undoubtedly one of the most distinct and exciting features of c language.it has added power and flexibility to the language. *pointers are more efficient in handling arrays and tables. *pointer can be used to support dynamic memory management. *pointers reduce length and complexity of programs. *increase the execution speed and thus reduce the program execution time. by following character's real power of c lies in proper use of pointers. pointer is called the jewel of c-language.

Related questions

Program to display multiplication of two matrix?

The matrix multiplication in c language : c program is used to multiply matrices with two dimensional array. This program multiplies two matrices which will be entered by the user.


How do you develop a JAVA program that computes matrices?

Matrices can't be "computed" as such; only operations like multiplication, transpose, addition, subtraction, etc., can be done. What can be computed are determinants. If you want to write a program that does operations such as these on matrices, I suggest using a two-dimensional array to store the values in the matrices, and use for-loops to iterate through the values.


Write a C program to find sum of 3 matrices?

matrix


What is matrix programming in C programming?

C Examples on Matrix OperationsA matrix is a rectangular array of numbers or symbols arranged in rows and columns. The following section contains a list of C programs which perform the operations of Addition, Subtraction and Multiplication on the 2 matrices. The section also deals with evaluating the transpose of a given matrix. The transpose of a matrix is the interchange of rows and columns.The section also has programs on finding the trace of 2 matrices, calculating the sum and difference of two matrices. It also has a C program which is used to perform multiplication of a matrix using recursion.C Program to Calculate the Addition or Subtraction & Trace of 2 MatricesC Program to Find the Transpose of a given MatrixC Program to Compute the Product of Two MatricesC Program to Calculate the Sum & Difference of the MatricesC Program to Perform Matrix Multiplication using Recursion


Is there any benefit in a C plus plus program to add two matrices?

No.


What is program counter?

Synonym for Instruction Pointer.


What is meant by an pointer in c program?

Pointer is like variable address the members in memory shell


What has the author H Markowitz written?

H. Markowitz has written: 'Simscript' -- subject(s): SIMSCRIPT (Computer program language) 'Harry Markowitz' -- subject(s): Investment analysis, Sparse matrices, Portfolio management


What is the difference between stack pointer and program counter?

The stack pointer keeps track of the top of the stack used by the current thread. The program counter keeps track of the next instruction in a program. Both are registers and both store a memory address.


What is the purpose of pointer in C?

the purpose of pointer in c for saving the memory space.,and reduce the length and complexity of the program


What has the author Theodorus Jozef Dekker written?

Theodorus Jozef Dekker has written: 'ALGOL 60 procedures in numerical algebra' -- subject(s): ALGOL (Computer program language) 'Evaluation of determinants, solution of systems of linear equations and matrix inversion' -- subject(s): Electronic data processing, Matrices, ALGOL (Computer program language), Mathematics


C Matrix addition program?

How we can addition Two Matrix plz send coding in C language mahesh dhanotiya astah_mahesh@rediff.com how i can built a square matrix in c,