Questions: 1 978

Answers by our Experts: 1 850

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

Write a program that allows the user to enter the coal usage at a power station for the first and second week of October in metric tonnes which is as follows:



Week 1: 29,31,29,30,30,28,35



Week 2: 33,37,28,32,31,30,32

Write a program to implement 2 Stacks in a single array of size N. The stacks

should not show overflow if there even a single slot available in the array. Write

the functions popA(), popB(), pushA(), pushB() for pushing and popping from

these stacks.


WAP to implement a stack using one queue.


WAP to implement a queue using one stack.


WAP to reverse a queue using recursion.


Write a menu driven program to implement Deques (both Input-restricted and

Output-restricted) operations such as Enqueue, Dequeue, Peek, Display of

elements, IsEmpty, IsFull using static array.


Students of 1st year will have choice of going to Physics Cycle or Chemistry Cycle of the academic curriculum. Teacher asks the student to enter the choice. If the choice is p, student is assigned Physics Cycle otherwise Chemistry Cycle. Software needs to be developed with following requirement:


1: Read the choice from the student


2: Check the choice


3: Display appropriate message (Physics Cycle or Chemistry Cycle)




Write a program that



1. Contains a function that displays the content of an integer array starting from the upper


bound on a single line.



2. Contains a function that shits all elements of an integer array by one to the right and


move the last element into the first position. For example, 1 4 9 16 25 would be


transformed into 25 1 4 9 16.



3. Test the functions in (1) and (2) with the aid of an initialized array of your choice in


the main function. Display the array before and after the shifting of the elements.

Write a program that



1. Contains a function that displays the content of an integer array starting from the upper bound on a single line.



2. Contains a function that swaps the first and last elements of an integer array. For


example, 1 4 9 16 25 would be transformed into 25 4 9 16 1.



3. Test the functions in (1) and (2) with the aid of an initialized array of your choice in the main function. Display the array before and after the shifting of the elements.



Using the formulas given below, write a program that:


1. Prompts the user for the size (N) of the data set.


2. Creates an array to store values of the data set.


3. Prompts the user to enter the values of the data set.


4. Receive and save data entered by the user.


5. Display the mean, variance, and standard deviation (sd) of the data set received.



Mean (x–) =(x1 + x2 +......+ XN)/N


Variance =(x1 - x–)² +(x2 - x–) + ..... + (XN - x–)²/N


sd=√variance




Note:


1. You are at liberty to decide what your program should look like when executed. Just ensure the steps above are followed and your grammar and formatting are sound.


2. Solve manually with the data set entered to confirm your program output.

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS