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 linux written in c or c++?
Write a program using display() function which takes two arguments.
What is pointer to member?
What is the most powerful coding language?
Am studying basic c++ programming, have been given the following assignment. Design a linear program to calculate the maximum stress a material can withstand given a force and a diameter of a circle. To find the required area pi should be defined. Have most of the program sorted out but am at a loss as to how to show the calculations required. Can anyone help?
Is java as fast as c++?
What is function prototyping?
What is the main purpose of c++?
How does atoi function work?
How to allocate memory dynamically for a reference?
Explain mutable storage class specifier.
Define macro.
Is c++ free?
What is a lambda function c++?
Can recursive program be written in C++?