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 second largest element in array w/o using sorting
techniques? use onle one for loop.

Answer Posted / tata indicom

What if the first element which you are assigning to max and
secondmax is itself the largest number in array.....
In such a case you will not be able to find second largest in
the array.....

Is This Answer Correct ?    9 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what are the advantages and disadvantages of a heap?

1047


Explain what does it mean when a pointer is used in an if statement?

1013


int i=10; printf("%d %d %d", i, i=20, i);

1561


How important is structure in life?

1040


What is abstract data structure in c?

984


Are local variables initialized to zero by default in c?

996


Can you pass an entire structure to functions?

1086


Differentiate between full, complete & perfect binary trees.

1058


What is difference between function overloading and operator overloading?

1056


What is the acronym for ansi?

1007


Explain what are run-time errors?

1045


Do you know the use of fflush() function?

1018


Here is a neat trick for checking whether two strings are equal

979


How can you tell whether two strings are the same?

1215


stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.

2413