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 / irfan fazli (trying to help tw
/* 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 ? | 14 Yes | 9 No |
What is computer-based information system (CBIS) mean?
If you are a team lead in any IT company, and two employees are under your supervision. If one employee is good and other cannot behave professionally and personally, then how will you handle this situation?
what is the difference between BI and BW security?
What are your strengths and talents?
expline the relevance of economic meltdown and the cost accounting
A network diagram for a hospital database. Consider your own set of processes for the hospital.
sir iam going for an interview on feb 2nd week and i would like too ask questions that they will pose too me 1:i hav choosen conchordia wisconsin why these university what should b my answer 2:i had selected mis in mba from conchordioa university why these course if they question wat should b my answer 3:and last question is wat is guarantee u will come bck my dad works as a production manager in saudi arabia soo wat should b my anser too them because i am going for mba wat should b my answer for return gurantee pls reply too me it will b gr8 off u yours sicerly
purpose of assigning Field Status Variant to Company code??
What tools do you use to monitor and control projects?
7. (a) How do you implement internal controls in IT systems? (b) How to design internal controls over financial reporting, when financial reporting is performed totally from the software application? Explain briefly the major points. (c) What are the additional controls needed, when the software interfaces are webbased? Explain the materiality of the payroll processing functions to be performed by webinterfaces from the control perspective.
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.
1 Answers EWR, MAH, SCDL Symbiosis Center for Distance Learning, Symbiosis,
Hi, I worked TCS (BA) third party for only 18 days. After that i didnt go to office due to some problem. i send resign letter through mail.Just i want to know whether its affect my career.? also my consultant is drop the mail TCS is ben for me so its true ...i need to pull back agin try. so its posssible Pls guide me