Find the second maximum in an array?

Answer Posted / jagdish patel

it's simple just sort an array in descending and then
print 2nd element of an array!!!!

Is This Answer Correct ?    27 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

total amount of milk produced each morning and then calculates and outputs the number of cartons needed for this milk , the cost of producing the milk and the profit from producing this milk.

2082


Arrange Doubly linked list in the ascending order of its integral value and replace integer 5 with 7?

3704


What are pointer-to-members? Explain.

636


What is the insertion operator and what does it do?

565


Ask to write virtual base class code?

2152






What is scope in c++ with example?

632


What are formatting flags in ios class?

610


What is the benefit of learning c++?

555


Can you be able to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?

625


What is the basic difference between C and C++?

627


why is iostream::eof inside a loop condition considered wrong?

595


Why is main an int?

530


Can a class be static in c++?

573


Why do we use classes in programming?

578


Is c++ map a hash table?

567