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 a storage class? Mention the storage classes in c++.
What is math h in c++?
In c++, what is the difference between method overloading and method overriding?
Why do we use iterators?
When the constructor of a base class calls a virtual function, why doesn't the override function of the derived class gets called?
What is the difference between set and map in c++?
What is a sequence in c++?
Where are setjmp and longjmp used in c++?
What is a c++ vector?
What is c++ map?
What is c++ library?
How does java differ from c and c++?
Write a program in c++ to print the numbers from n to n2 except 5 and its multiples
What is function prototyping? What are its advantages?
How do we implement inheritance in c++?