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 a pointer with example?
Give an example of run-time polymorphism/virtual functions.
What is private public protected in c++?
What is a tuple c++?
What's the "software peter principleā?
How do you clear a map in c++?
How do you add an element to a set in c++?
Explain class invariant.
Explain the properties and principles of oop.
When should we use multiple inheritance?
Evaluate as true or false: !(1 &&0 || !1) a) True b) False c) Invalid statement
What is the outcome of cout< a) 16 b) 17 c) 16.5
What is jump statement in C++?
What is boyce codd normal form in c++?
What are activex and ole?