Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / pramod

#include<stdio.h>


int main()
{
int a[10]={13,12,34,56,73,21,234,5,76,2};
int tmp,i;
tmp=a[0];
for(i=0;i<=9;i++)
{
if(a[i]>tmp)
{
tmp=a[i];
}
}
printf("\n largest number is %d\n",tmp);
return 0;
}

Is This Answer Correct ?    27 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What functions are in conio h?

1175


Explain the binary height balanced tree?

1172


Describe how arrays can be passed to a user defined function

1276


WRITE A CODE IN C TO SEARCH A FILE FROM NOTEPAD FILE.

2434


What are the different types of control structures?

1030


what is reason of your company position's in india no. 1.

2304


An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above

1160


What is a function in c?

1557


What are logical errors and how does it differ from syntax errors?

1287


If null and 0 are equivalent as null pointer constants, which should I use?

1200


What is the difference between exit() and _exit() function in c?

1064


which of the following statement is wrong a) mes=123.56; b) con='T'*'A'; c) this='T'*20; d) 3+a=b;

3236


What is this pointer in c plus plus?

1069


main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }

1535


What is call by reference in functions?

1418