Answer Posted / adnan sheikh
int SecondMax(int Array[], int ALength)
{
int Fmax,Smax;
Fmax=Smax=Araay[0];
for (int i = 0; i < ALength; i++)
{
if (Array[i] > Smax){
if (Array[i] < Fmax){
Smax = Array[i];
}
else{
Smax = Fmax;
Fmax = Array[i];
}
}
}
return Smax;
}
Is This Answer Correct ? | 9 Yes | 8 No |
Post New Answer View All Answers
What is polymorphism & list its types in c++?
Why do we use using namespace std in c++?
How can I learn c++ easily?
Explain the use of vtable.
How do you clear a set in c++?
What are the characteristics of friend functions?
Write a program to concatenate two strings.
Which sort does c++ use?
What is the basic difference between C and C++?
What is function overriding in c++?
What is c++ iterator?
What is the difference between #define debug 0 and #undef debug?
What is flag in computer?
What is a try block?
Show the application of a dynamic array with the help of an example.