:: 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                      
Categories >> Software >> Programming Languages >> C


 C interview questions  C Interview Questions (2264)
 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)
write a program to find the largest and second largest 
integer from an array
 Question Submitted By :: C
I also faced this Question!!     Answer Posted By  
# 1
void main()
int a[5],x,y,c;
for (x=0;x<5;x++)
printf("enter any number");
for (x=0;x<5;x++)
for (y=0;y<4;y++)
if (a[y]>a[y+1])
printf("\nlargest no:-%d",a[y]);
printf("\nsecond largest no:-%d",a[y-1]);
Is This Answer Correct ?    16 Yes 7 No
Manish Gupta
# 2
use bubble sort next to this, print last n second from last.. 
Is This Answer Correct ?    1 Yes 1 No

Other C Interview Questions
  Question Asked @ Answers
Look at the Code: #include<string.h> void main() { char s1[]="abcd"; char s2[10]; char s3[]="efgh"; int i; clrscr(); i=strcmp(strcat(s3,ctrcpy(s2,s1))strcat(s3,"abcd")); printf("%d",i); } What will be the output? A)No output B) A Non Integer C)0 D) Garbage Accenture 6
convert 0.9375 to binary CTS 2
Every time i run a c-code in editor, getting some runtime error and editor is disposing, even after reinstalling the software what may be the problem?   2
what is data structure? CBSE 5
Write a c program to Find the name that you entered is male name or female name? Such as Sunjay is name of male and Payal is name of female Infosys 5
please can some one guide me, to the answer Write a C program to enter 15 numbers as an input from the keyboard and program will find and print odd numbers and their average. i have studied while and do while loop for loop if and else if switch   2
wat is the output #define VOLEDEMORT _who_must_not_be_named int main() { printf("VOLEDEMORT"); }   2
what is available in C language but not in C++? TCS 10
given the piece of code int a[50]; int *pa; pa=a; to access the 6th element of the array which of the following is incorrect? a.*(a+5) b.a[5][5] d.*(*pa + 5) TCS 6
what will be the output of the following program, justify? #define TEST int TEST getdata() { static i; i+=10; return i; } main() { int k; k = getdata(); }   3
How to swap two values using a single variable ? condition: Not to use Array and Pointer ?   6
how can i print "hello"   3
For more C Interview Questions Click Here 

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