write a method for an array in which it can display the
largest n next largest value.

Answer Posted / akshatgarg

well there are many methods one simple method i
Find the largest.
Find the smallest.
replace largest by smallest-1
then again search for the largest.

Now this time u will get the second largest number.

Is This Answer Correct ?    3 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is putchar() function?

840


How do you define a string?

845


What do you mean by a local block?

824


Explain how do you list files in a directory?

819


What is the difference between null pointer and wild pointer?

913


Is c object oriented?

719


Linked lists -- can you tell me how to check whether a linked list is circular?

847


Difference between pass by reference and pass by value?

859


What is the most efficient way to store flag values?

897


What is meant by operator precedence?

879


What do you mean by c what are the main characteristics of c language?

791


What is the deal on sprintf_s return value?

830


What are the advantages of using macro in c language?

805


How will you print TATA alone from TATA POWER using string copy and concate commands in C?

1156


What is the difference between the local variable and global variable in c?

724