write a c program to find largest number in matrix(in each
row,each column, diagonally, and in the whole matrix)? Its
urgent.
Answer Posted / sandip sen purkayastha
//Find the largest no. in matrix//
//This C program is implemented by SANDIP SEN PURKAYASTHA//
#include<stdio.h>
main()
{
static int a[3][3]={
{11,1,7},
{13,98,56},
{23,43,89},
};
int i,j,big;
big=a[0][0];
printf("The 3*3 matrix is:\n\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("%d\t",a[i][j]);
if(a[i][j]>big)
big=a[i][j];
}
printf("\n");
}
printf("\nThe largest no. in this matrix is: %d",big);
}
Is This Answer Correct ? | 13 Yes | 22 No |
Post New Answer View All Answers
Is javascript written in c?
Explain why c is faster than c++?
What is difference between array and pointer in c?
How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?
State two uses of pointers in C?
What is non linear data structure in c?
What are the loops in c?
How to implement a packet in C
Is c still used?
Why isn't any of this standardized in c? Any real program has to do some of these things.
a c code by using memory allocation for add ,multiply of sprase matrixes
Are the variables argc and argv are local to main?
Explain how do you search data in a data file using random access method?
can we implement multi-threads in c.
What math functions are available for integers? For floating point?