write a c program to find largest number in matrix(in each
row,each column, diagonally, and in the whole matrix)? Its
urgent.

Answers were Sorted based on User's Feedback



write a c program to find largest number in matrix(in each row,each column, diagonally, and in the..

Answer / azad sable, chiplun

/*pick up largest number fro 5*5 matrix/*
void main()
{
static int[5][5]={
{11,1,7,9,7},
{13,54,56,2,5},
{23,43,89,22,13},
{14,15,17,16,19},
{45,3,6,8,10}
};
int i,j,big;
clrscr();
big=a[0][0];
printf("\nThe 5*5 matrix in:\n");
for(i=0;i<=4;i++)
{
for(j=0;j<=4;j++)
{
printf("%d\t",a[i][j]_;
if(a[i][j]>big)
big=a[i][j];
}
printf("\n");
}
printf("\nlargest no. in matrix is%d"",big);
getch();
}

Is This Answer Correct ?    51 Yes 43 No

write a c program to find largest number in matrix(in each row,each column, diagonally, and in the..

Answer / 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

More C Interview Questions

what is diffrence between string and character array?

1 Answers  


the 'sizeof' operator reported a larger size than the calculated size for a structure type. What could be the reason?

0 Answers  


To find whether a number is even or odd without using any conditional operator??

12 Answers   College School Exams Tests, IBM,


How do I get a null pointer in my programs?

0 Answers  


How do you use a pointer to a function?

0 Answers  






i=10,j=20 j=i,j?(i,j)?i:j:j print i,j

1 Answers   CSC,


hi send me sample aptitude papers of cts?

0 Answers  


write a program to generate 1st n fibonacci prime number

2 Answers  


Why calloc is better than malloc?

0 Answers  


What does dm mean sexually?

0 Answers  


write a program to print infinte number

4 Answers  


Synonymous with pointer array a) character array b) ragged array c) multiple array d) none

0 Answers  


Categories