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
Is c++ vector a linked list?
Why the usage of pointers in C++ is not recommended ?
What are the steps in the development cycle?
What is c++ & why it is used?
What is rtti in c++?
Will a catch statement catch a derived exception if it is looking for the base class?
Write a program to find the Fibonacci series recursively.
Which software is used for c++ programming?
Write a program using shift_half( ) function to shift the elements of first half array to second half and vice versa.
What does flush do?
Write about the members that a derived class can add?
Give the difference between the type casting and automatic type conversion. Also tell a suitable C++ code to illustrate both.
What are the differences between malloc() and calloc()?
Define what is constructor?
Is c++ faster than c?