find largest element in array w/o using sorting techniques.

Answer Posted / manjunath

#include<stdio.h>
void main()
{
int a,b[4]={3,2,7,4,9};
a[0]=b[0];
for(i=1;i<5;i++)
{
if(a<b[i])
{
a=b[i];
}
}
printf("the largest num is %d",a);
}

Is This Answer Correct ?    3 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is main function in c?

551


What is file in c preprocessor?

656


Write a program to identify if a given binary tree is balanced or not.

689


What is ambagious result in C? explain with an example.

2059


What is break in c?

590






What is the function of volatile in c language?

670


Is linux written in c?

603


Define the scope of static variables.

608


Why static is used in c?

627


What are the functions to open and close the file in c language?

597


What is character set?

687


hello freinds next week my interview in reliance,nybody has an idea about it intervew questions..so tell

1675


What functions are in conio h?

663


What is c programming structure?

623


What is the size of enum in c?

625