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
What is the ANSI C Standard?
What is void main ()?
How would you use the functions fseek(), freed(), fwrite() and ftell()?
Write a C program on Centralized OLTP, Decentralized OLTP using locking mechanism, Semaphore using locking mechanism, Shared memory, message queues, channel of communication, sockets and a simple program on Saving bank application program using OLTP in IPC?
What is struct node in c?
The difference between printf and fprintf is ?
How many types of operator or there in c?
Explain how are portions of a program disabled in demo versions?
What is ## preprocessor operator in c?
What is a null pointer in c?
What does a pointer variable always consist of?
How does #define work?
What is null pointer constant?
What is an lvalue?
Explain what is the use of a semicolon (;) at the end of every program statement?