Questions: 9 913

Answers by our Experts: 9 913

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

(bubble sort)smaller values gradually “bubble” their way upward to the top of the array like air bubbles rising in water, while the larger values sink to the bottom. The bubble sort makes several passes through the array. On each pass, successive pairs of elements are compared. If a pair is in increasing order (or the values are identical), we leave the values as they are. If a pair is in decreasing order, their values are swapped in the array. The comparisons on each pass proceed as follows the 0th element value is compared to the 1st, the 1st is compared to the 2nd, the 2nd is compared to the third, the second-to-last element is compared to the last element. Write a function named bubblesort that accepts the unsorted array and the size as its parameter. The bubblesort function


sorts an array of 10 integers.Call the function in the main program with array argument and size to test its correctness. Note that the top of the array is the first element at index 0 and the bottom of the array is at index size-1

Write a program that takes two strings and outputs the longest string. If they are the same length then output the second string.


Ex. If the input is:


almond pistachio

the output is:


pistachio


Write a program that takes in three integers as inputs and outputs the largest value.

Ex: If the input is:

1 2 3

and the outut must be 3



write a program using delphi to calculate and store the average obtained by 5 students and print the student that made the highest mark


Objective:

Write a program that uses a structure named Student to store the following information about a student:

• Student ID

• Student Name

• Major

• Year Passed

The program should create two Student variables, store values in their members, and pass each one, in turn, to a function that displays the information about the student in a clearlv formatted

manner.


please find the question on below link:



https://drive.google.com/file/d/17pfgTzAo5QxJ0K511KVR59WrywFI6iyH/view?usp=sharing

The following C++ program segment computes C = A * B, where A is an “m” by “n”

matrix, B is an “n” by “r” matrix and C is an “m” by “r” matrix.


for (long int i = 0; i < m; i++)

for (long int j = 0; j < r; j++)

{

long double Sum = 0;

for (long int k = 0; k < n; k++)

Sum = Sum + A[i][k] * B[k][j];

C[i][j] = Sum;

}



i) How many times does the code iterate in computing Sum?

ii) How many times does the code iterate in computing the j column of C, i.e. C[i][j] for a fixed i and j = 1, 2, 3, ..., r?

iii) How many times does the code iterate in computing the complete matrix C?


Make a C++ program that will print this output using while loop.

1

16

49

100

169



Write a code (or pseudo-code) for summing the first N odd numbers.

An academic department of Information School wants to generate students report for TEN final year students which will be graduated soon. A name list of TEN students and their FOUR scores are stored in arrays. Write a complete C++ program to do the following:

a. Create 5 parallel arrays to store the:

i. TEN students name called studentName

ii. TEN scores for subject CS402 called cs402

iii. TEN scores for subject CS315 called cs315

iv. TEN scores for subject CS607 called cs607

v. TEN scores for subject CS558 called cs558

b. Read input into the arrays and display them.

c. After processing all the information, the program should:

i. Calculate the average marks for each student

ii. Determine how many students are graduated with first class degree, with average score more than 80%.

iii. Display best student with highest score of each subject iv. Display best student with the highest average score to be awarded with chancellor award


LATEST TUTORIALS
APPROVED BY CLIENTS