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
What is data types c++?
find the two largest values among the 6 numbers using control structures : do-while,for,if else,nestedif- else ,while. one or two of them.
Why is c++ so fast?
What is class and structure in c++?
Difference between strdup and strcpy?
What is data binding in c++?
What is a type library?
What is the difference between the functions memmove() and memcpy()?
What is the main purpose of c++?
Why should we use null or zero in a program?
Why do you use the namespace feature?
There are 100 students in a class. The management keep information in two tables. Those two tables are given like Roll no Name Age 001 ABC 15 002 XYZ 14 and Roll No Subject Marks 001 Math 75 001 Physics 55 002 Math 68 001 Hindi 69 They want the information like this Roll No Name Hindi Physics Math Total 001 ABC 69 55 75 199 002 XYZ 68 74 84 226 And Roll No Suject Highest 001 Math 98 007 Physics 84 021 Hindi 74 All 275 All information is kept in structure in main memory. You have to find last two tables.
What is the purpose of ios::basefield in the following statement?
What is class syntax c++?
How is objective c different from c++?