Answer Posted / foreverkushal
int SecondMax(int *Array, int ACount)
{
int Fm = 0, Sm = 0;
for (int i = 0; i < ACount; i++)
{
if (Array[i] > Sm)
{
if (Array[i] < Fm) Sm = Array[i];
else
{
Sm = Fm;
Fm = Array[i];
}
}
}
return Sm;
}
| Is This Answer Correct ? | 31 Yes | 22 No |
Post New Answer View All Answers
What is an operator in c++?
What is c++ stringstream?
Explain the static storage classes in c++.
What is the disadvantage of using a macro?
What do you mean by storage classes?
What is a set in c++?
What does h mean in maths?
What is heap sort in c++?
What does scope resolution operator do?
Should you pass exceptions by value or by reference?
In a function declaration what does extern means?
What do the keywords volatile and mean mutable?
What is the difference between object-oriented programming and procedural programming?
Explain the purpose of the keyword volatile.
How do I run c++?