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
Differentiate between a constructor and a destructor in c++.
What do you mean by late binding?
Is it possible to provide default values while overloading a binary operator?
what does the following statement mean? int (*a)[4]
Write about the scope resolution operator?
Is it possible to have a recursive inline function in c++?
why is c++ called oops? Explain
Does there exist any other function which can be used to convert an integer or a float to a string?
What is array in c++ pdf?
What are the c++ access specifiers?
What is a class template?
How many types of classes are there in c++?
Explain shallow copy?
If you push the numbers (in order) 1, 3, and 5 onto a stack, which pops out first a) 1 b) 5 c) 3
what is upcasting in C++?