find second largest element in array w/o using sorting
techniques? use onle one for loop.
Answer Posted / tata indicom
What if the first element which you are assigning to max and
secondmax is itself the largest number in array.....
In such a case you will not be able to find second largest in
the array.....
| Is This Answer Correct ? | 9 Yes | 4 No |
Post New Answer View All Answers
Explain what are the advantages and disadvantages of a heap?
Explain what does it mean when a pointer is used in an if statement?
int i=10; printf("%d %d %d", i, i=20, i);
How important is structure in life?
What is abstract data structure in c?
Are local variables initialized to zero by default in c?
Can you pass an entire structure to functions?
Differentiate between full, complete & perfect binary trees.
What is difference between function overloading and operator overloading?
What is the acronym for ansi?
Explain what are run-time errors?
Do you know the use of fflush() function?
Here is a neat trick for checking whether two strings are equal
How can you tell whether two strings are the same?
stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.