Answer Posted / navs
if we take the array as
arr[]={1,4,7,2,10,0,6}
get the count
int count =6;
int max =arr[0];
int smax;
for (i=0;i<=count;i++)
{
if(max<arr[i])
{
smax=max;
max=max[i];
}
}
smax would give the second largest number
Is This Answer Correct ? | 0 Yes | 6 No |
Post New Answer View All Answers
What is struct c++?
Why do we use iterators?
Which is the best c++ software?
Is c++ a dying language?
What is abstraction c++?
Is swift faster than go?
what are Access specifiers in C++ class? What are the types?
What does flush do c++?
What is one dimensional array in c++?
What is the function to call to turn an ascii string into a long?
Which c++ compiler is best?
What is a friend function in c++?
What is a multiset c++?
What function initalizes variables in a class: a) Destructor b) Constitutor c) Constructor
What is c++ good for?