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

The statement, int(*x[]) () what does in indicate?

640


‎How to define structures? · ‎

620


Why pointers are used in c?

580


What does %2f mean in c?

672


Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.

654






What's the difference between constant char *p and char * constant p?

650


What is c language and why we use it?

612


What are the preprocessor categories?

633


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

578


Are c and c++ the same?

623


What is getch () for?

670


What is the difference between functions abs() and fabs()?

641


What is the use of a static variable in c?

586


Explain what is the advantage of a random access file?

656


This is a variation of the call_me function in the previous question:call_me (myvar)int *myvar;{ *myvar += 5; }The correct way to call this function from main() will be a) call_me(myvar) b) call_me(*myvar) c) call_me(&myvar) d) expanded memory

722