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

Which built-in library function can be used to match a patter from the string?

1269


How do you determine whether to use a stream function or a low-level function?

1102


C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions

1027


Can math operations be performed on a void pointer?

1018


c language interview questions & answer

1927


Explain enumerated types in c language?

1010


Can one function call another?

1071


Explain what is page thrashing?

1068


What is a structure in c language. how to initialise a structure in c?

1040


Tell us bitwise shift operators?

1054


Is the exit() function same as the return statement? Explain.

1050


Is c easy to learn?

962


What is main function in c?

1041


What are the features of c languages?

1051


What are the 5 data types?

1087