ALLInterview.com :: Home Page KalAajKal.com
 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                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Business Management  >>  IT Management
 
 


 

 
 Business Administration interview questions  Business Administration Interview Questions
 Marketing Sales interview questions  Marketing Sales Interview Questions
 Finance interview questions  Finance Interview Questions
 Human Resources interview questions  Human Resources Interview Questions
 Personnel Management interview questions  Personnel Management Interview Questions
 Hotel Management interview questions  Hotel Management Interview Questions
 Industrial Management interview questions  Industrial Management Interview Questions
 Infrastructure Management interview questions  Infrastructure Management Interview Questions
 IT Management interview questions  IT Management Interview Questions
 Non Technical interview questions  Non Technical Interview Questions
 Business Management AllOther interview questions  Business Management AllOther Interview Questions
Question
Write a C Program to declare an array for 2 0 floats. 
Accept the values from the user
sort the two arrays in descending order. Merge the two 
arrays into a new array and display
the new array.
 Question Submitted By :: Rajesh
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Write a C Program to declare an array for 2 0 floats. Accept the values from the user sort the two arrays in descending order. Merge the two arrays into a new array and display the new array.
Answer
# 1
/* Build your program around this..... */
main()
{
int a, b, c;
float t;

/*declare an array for 2 0 floats*/
float aList1[20];
float aList2[20];
float aList[40];

/* Accept the values from the user */
/* 1 */
for (c=0; c++;c <20)
   scanf("%f", alist1+c);
/* 2 */
for (c=0; c++;c <20)
   scanf("%f", alist2+c);

/* sort the two arrays in descending order */
/* 1 */
for (a=0; a++; a <20)
   for (b=a+1; b++; b <20)
      if (aList1[a] < aList1[b])
      {
         t = aList1[a] ;
         aList1[a] aList1[b] ;
         aList1[b] =t ;
      }

/* 2 */
for (a=0; a++; a <20)
   for (b=a+1; b++; b <20)
      if (aList2[a] < aList2[b])
      {
         t = aList2[a] ;
         aList2[a] aList2[b] ;
         aList2[b] =t ;
      }

/* Merge the two arrays into a new array */
c=0;
while (a < 20 || b < 20)
   if (aList1[a] > aList2[b])
      aList[c++] = aList[a++]
   else
      aList[c++] = aList[b++]

/* display the new array */
for (c=0; c++;c <40)
   printf("%f, ", alist1[c]);
printf("\n");
}
 
Is This Answer Correct ?    2 Yes 0 No
Irfan Fazli (trying To Help Tw
 

 
 
 
Other IT Management Interview Questions
 
  Question Asked @ Answers
 
TDS calculation Kotak2
in my office to access data fast i replaced 8 port hub with 8 port dlink switch my network connectivity is gone all the led keep blinking do you i have to change cabeling or change the switch  1
Write a C Program to declare an array for 2 0 floats. Accept the values from the user sort the two arrays in descending order. Merge the two arrays into a new array and display the new array. Symbiosis1
What is the difference between product based and service based IT companies?  1
YOU ARE COMING FROM CITY "A" AND WANT TO REACH "B". 3 ROADS MEET AT JUNCTION 'X',TO/FROM A,B,AND C. AT X,2 PERSON ARE STANDING-1ALWAYS SAY TRUTH ,ANOTHER ALWAYS SAY LIE. IN ONLY ONE QUESTION,HOW WILL YOU ASK THE WAY TO 'B'(YOU ARE COMING FROM 'A')  4
hi frnds, i hv a querry regarding my future. i m an engineer (electronics n communication),hving two year exp in telecom sectoe as a RF optimization engg. now doing MBA in MARKETING. can nyone suggest me which sector of management and what profile will be the best accoeding my past profile where i can hv a advantage of my technical background... plz help me frnds...  2
 
For more IT Management Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com