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 is data types?

1096


What is sizeof int?

1113


How many types of sorting are there in c?

1067


what are enumerations in C

1171


Why is sprintf unsafe?

1089


how to write optimum code to divide a 50 digit number with a 25 digit number??

3275


How to establish connection with oracle database software from c language?

2211


What do you mean by invalid pointer arithmetic?

1095


Using which language Test cases are added in .ptu file of RTRT unit testing???

4293


Wt are the Buses in C Language

3228


What are identifiers in c?

1209


What is the difference between ā€˜g’ and ā€œgā€ in C?

4026


What is unary operator?

1115


What is %d used for?

1048


What are local static variables?

1164