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 (2253)
 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
 
How to calculate Total working time using Login and logout? Wipro 2
what is difference between array and structure? TCS 42
int a[3][5]={ {1,2,3,4,5],{2,3,4,5,6},{10,11,12,13,14}}; int *p=&a; printf(%d,*(*(x+1)+3)); Wipro 2
Find the O/p of the following 1) #include int main() { char c='1'; int j=atoi(c); } Subex 3
Write a program in c using only loops to print * * * * * ******* Ibm 2
what is the use of getch() function in C program.. difference b/w getch() and getche()?? Wipro 28
#include<stdio.h> main() {int i=1;j=1; for(;;) {if(i>5) break; else j+=1; printf("\n%d",j) i+=j; } } HCL 3
5. What kind of sorting is this: SORT (k,n) 1.[Loop on I Index] repeat thru step2 for i=1,2,........n-1 2.[For each pass,get small value] min=i; repeat for j=i+1 to N do { if K[j]<k[min] min=j; } temp=K[i];K[i]=K[min];K[min]=temp; 3.[Sorted Values will be returned] A)Bubble Sort B)Quick Sort C)Selection Sort D)Merge Sort Accenture 2
write a addition of two no. program with out using printf,scanf,puts .   4
Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions) Satyam 2
1. Can we use the for loop this way? for(;i>5;) 2. What is the use of pointers? 3. what is array of pointer? 4. What is the difference between file and database? 5. Define data structure?   1
what is the code for getting the output as * ** *** Caritor 5
 
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