Answer Posted / navs
if we take the array as
arr[]={1,4,7,2,10,0,6}
get the count
int count =6;
int max =arr[0];
int smax;
for (i=0;i<=count;i++)
{
if(max<arr[i])
{
smax=max;
max=max[i];
}
}
smax would give the second largest number
| Is This Answer Correct ? | 0 Yes | 6 No |
Post New Answer View All Answers
Mention the storage classes in c++.
What is function overriding in c++?
What is the difference between a declaration and a definition?
What are arithmetic operators?
Can you please explain the difference between overloading and overriding?
What is a catch statement?
What is enum c++?
What do you mean by enumerated data type?
When is dynamic checking necessary?
What is a constant? Explain with an example.
Discuss the effects occur, after an exception thrown by a member function is unspecified by an exception specification?
Explain stack & heap objects?
What is private public protected in c++?
What is overloading unary operator?
How a modifier is similar to mutator?