ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 
Categories >> Software >> Programming Languages >> C
 
 


 

 
 C interview questions  C Interview Questions (2254)
 C++ interview questions  C++ Interview Questions (1111)
 VC++ interview questions  VC++ Interview Questions (342)
 Delphi interview questions  Delphi Interview Questions (510)
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions (646)
Question
write a method for an array in which it can display the 
largest n next largest value.
 Question Submitted By :: C
I also faced this Question!!     Answer Posted By  
 
Answer
# 1
well there are many methods one simple method i
Find the largest.
Find the smallest.
replace largest by smallest-1
then again search for the largest.

Now this time u will get the second largest number.
 
Is This Answer Correct ?    3 Yes 4 No
Akshatgarg
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
write a program to swap Two numbers without using temp variable. HP 75
what is difference between overriding and overloading?   1
print the following using nested for loop. 5 4 3 2 1 1 2 3 4 3 2 1 1 2 1 2 1 1 2 3 4 3 2 1 1 2 3 4 5 IBM 7
Heyyy All, Just a challenge . A C program with if Else if(){ /// insert sumthing print ("in if") // insert sumting } else { ///// insert sumthing print ("in else"); //// insert sumthing } can anyone modify it so that program prints. if and else both   3
what is bitwise operator? IBM 1
how to exchnage bits in a byte b7<-->b0 b6<-->b1 b5<-->b2 b4<-->b3 please mail me the code if any one know to rajeshmb4u@gmail.com Honeywell 3
How to write a program for swapping two strings without using 3rd variable and without using string functions. iGate 7
main() { char *ptr = "Ramco Systems"; (*ptr)++; printf("%s\n",ptr); ptr++; printf("%s\n",ptr); } Find the Outputs? CitiGroup 9
Reverse the part of the number which is present from position i to j. Print the new number. eg: num=789876 i=2 j=5 778986   1
why we use pointer in c HCL 7
what is the diff between the printf and sprintf functions?? and what is the syntax for this two functions ??   5
pgm to find number of words starting with capital letters in a file(additional memory usage not allowed)(if a word starting with capital also next letter in word is capital cann't be counted twice) Subex 2
 
For more C Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com