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 are the uses of pointers?
How to declaring variables in c++?
What is the first name of c++?
Write a function to find the nth item from the end of a linked list in a single pass.
In inline " expression passed as argument are evalauated once " while in macro "in some cases expression passed as argument are evaluated more than once " --> i am not getting it plz help to make me understand....
What do you mean by translation unit in c++?
What is virtual base class?
What is function prototyping?
What is scope in c++ with example?
How new/delete differs from malloc()/free?
What kind of problems can be solved by a namespace?
What are disadvantages of pointers?
What is the best way to declare and define global variables?
what is data encapsulation in C++?
Give an example of run-time polymorphism/virtual functions.