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 :: operator in c++?
What is increment operator in c++?
What does obj stand for?
Can you help me with this one? Make a program that when a user inputed a Product Name, it will display its price, and when the user inputed the quantity of the inputed product, it will show its total price. The output must be like this: Product Name: Price: Quantity: Total Price: ..this is the list of products to be inputed: Cellphone - 1500 Washing Machine - 5200 Television - 6000 Refrigirator - 8000 Oven - 2000 Computer - 11000 thanks..:D
Can you pass a vector to a function?
What is the difference between interpreters and compilers?
What function initalizes variables in a class: a) Destructor b) Constitutor c) Constructor
Can you be able to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?
How does com provide language transparency?
Should a constructor be public or private?
What is prototype for that c string function?
What is lvalue?
Why is main an int?
Write a program which uses functions like strcmp(), strcpy()? etc
Explain one method to process an entire string as one unit?