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


Please Help Members By Posting Answers For Below Questions

Is javascript written in c?

586


Explain why c is faster than c++?

579


What is difference between array and pointer in c?

542


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?

1594


State two uses of pointers in C?

642






What is non linear data structure in c?

579


What are the loops in c?

597


How to implement a packet in C

2401


Is c still used?

606


Why isn't any of this standardized in c? Any real program has to do some of these things.

630


a c code by using memory allocation for add ,multiply of sprase matrixes

2306


Are the variables argc and argv are local to main?

793


Explain how do you search data in a data file using random access method?

700


can we implement multi-threads in c.

672


What math functions are available for integers? For floating point?

627