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 register variable in c language?

0 Answers  


What is New modifiers?

0 Answers   NA,


What is the meaning When we write "#include" what is # and what does include does there???

22 Answers   HCL, Wipro,


Efficient data structure for store/search list of 1000 records a)array b)double linked list c)circular queue d)hash table

3 Answers   Value Labs,


What is the use of getchar functions?

0 Answers  






1.)how to find d most repeated word in a string? string ="how do you do"?? output should be do

1 Answers   AAS, Nagarro, Vuram,


Does sprintf put null character?

0 Answers  


a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor

0 Answers  


main() { int x=20,y=35; x = y++ + x++; y = ++y + ++x; printf("%d %d\n",x,y); }

27 Answers   Advent Global Solutions, CitiGroup, Valeo Lighting Systems India Private Limited, Vishal Transformers, Wipro, Zencer,


how to write a bubble sort program without using temporary variable?

1 Answers   Aricent,


what is the c source code for the below output? 1 0 1 1 0 1 0 1 0 1 1 0 1 0 1

0 Answers  


1 232 34543 4567654 can anyone tell me how to slove this c question

6 Answers  


Categories