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 (2265)
 C++ interview questions  C++ Interview Questions (1119)
 VC++ interview questions  VC++ Interview Questions (342)
 Delphi interview questions  Delphi Interview Questions (510)
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions (648)
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
 
What is the memory allocated by the following definition ? int (*x)(); ADITI 2
what is the self-referential structure?   1
what is difference between c and c++   4
#define min((a),(b)) ((a)<(b))?(a):(b) main() { int i=0,a[20],*ptr; ptr=a; while(min(ptr++,&a[9])<&a[8]) i=i+1; printf("i=%d\n",i);}   3
what is the benefit of c30   1
What is the purpose of the code, and is there any problem with it? unsigned int f( unsigned n ) { return n & 7; } google 1
Which of the following sorts is quickest when sorting the following set: 1 2 3 5 4 1) Quick Sort 2) Bubble Sort 3) Merge Sort   7
what is the output? #define fun(a,b,t) (g ##t=(a),(a)=(b),(b)=g##t) float gfloat; main() { float a=1.12,b=3.14; fun (a,b,float); printf("na=%4.2f,b=%4.2f",a,b); } A)Error in Defining Macro B)a=1.12,b=3.14 C)a=3.14,b=1.12 D)None of the Above Accenture 3
main() { printf(5+"Vidyarthi Computers"); }   6
how many argument we can pas in in a function CTS 25
What are .h files and what should I put in them?   3
which operator having highest precedence? a.)+ b.)++ c.)= d.)%   4
 
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