write a method for an array in which it can display the
largest n next largest value.
Answer / 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 |
What are the Advantages of using macro
Difference between null pointer and dangling pointer?
Synonymous with pointer array a) character array b) ragged array c) multiple array d) none
what is the difference between exit() and _exit() functions?
program for following output using for loop? 1 2 3 4 5 2 3 4 5 3 4 5 4 5 5
Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it?
char *p="name"; printf(p);
For what purpose null pointer used?
When should volatile modifier be used?
main() { int i=400,j=300; printf("%d..%d"); }
How can I find leaf node with smallest level in a binary tree?
/*program to calculate hra,da in salary if salary less than 10000 then hra15%,da13% otherwise hra20%,da18%/*