For example a[]={0,100,5,2,3,2 00}
Ouput: {200,100}
User Profile
Collapse
-
SrikanthBichala started a topic Find the highest n second highest numbers in an array within a single iteration.in CFind the highest n second highest numbers in an array within a single iteration.
-
what purpuse this logic is used
1) int foo(int x)
{
if(x<=0)
return 0;
else
return 1+foo(x/10);
}
a) What is the output of this logic for foo(12345)
b) What purpose this logic is used
c) If we give negative number what output will get. If u future enhance n find a bug, how u change the code to fix the bug n the remain work for negative n positive numbers.
No activity results to display
Show More