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

Is there any demerits of using pointer?

0 Answers  


main() { int a; a=++100; printf("%d",a); getch(); }

4 Answers  


WRITE A PROGRAM TO FIND A REVERSE OF TWO NO

7 Answers  


What is Your Name :)

1 Answers  


write a program to display the numbers in the following format 4 4 3 3 3 3 2 2 2 2 2 2 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 4

9 Answers   IBM, NIIT, Winit,






What is the relation between # and include<stdio.h>

5 Answers   HCL,


what is the hardware model of CFG( context free grammar)

0 Answers   Microsoft,


a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion

0 Answers   Mindteck,


what is diff between localstatic and globalstatis variable possible 2 use in another file...?

2 Answers   HCL,


In header files whether functions are declared or defined?

1 Answers   TCS,


I have an array of 100 elements. Each element contains some text. i want to: append a star character to the end of every fifth element remove every second character from every tenth element, and… add a line feed (ascii 10) after the 30th character of every array element whose length is greater than 30 characters.

1 Answers  


Is main() function predfined or userdefined?

11 Answers  


Categories