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 / 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 |
Post New Answer View All Answers
What does %p mean c?
What was noalias and what ever happened to it?
What does the characters “r” and “w” mean when writing programs that will make use of files?
GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)
What is the meaning of ?
What is gets() function?
Can you please compare array with pointer?
What are bitwise shift operators in c programming?
How pointer is different from array?
What is the size of structure in c?
What is main () in c?
What is switch in c?
Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.
What is difference between structure and union in c?
Why c is faster than c++?