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

A toy company manufactures electronic learning boards for kids to learn alphabets. Accordingly,


when a kid presses 1 alphabet a is shown on the screen, and when 2 is pressed ab is shown along


with the previous alphabet and so on. The patterns are likely to be as follow:



a


ab


abc


abcd


abcde


:


:


:


:


abcdefghijklmnopqrstuvwxyz


Develop a C-script which generates the above-mentioned pattern.


Develop a program that asks user to enter a real number. After entering the numbers, the program


should display how many positive, negatives, and zeros were entered by the user. In addition to


that, it should provide information about the majority count either of the entered numbers.


Note : use any loop and avoid to use arrays .

What will the value of the answer variable be after the code segment below has been run.

int answer ;  

int number1 = 285, number6 = 46, number11 = 1;  

  

answer = ( number1 % number6 ) / number11;  




I have a problem with a coding assignment and am becoming clueless as to how to solve it.


I am working with PGM images and I have read the data and saved it into a buffer (2D array ex. data[width][height])


I have been asked to then transfer that data into an array of 2d arrays of size 8x8 for the 2d arrays and the number of arrays is width*height/64.


How would I go about storing the data from the 2D buffer into the array of 8x8 2D arrays?


Write a program to take as input an array of N names, an array of N ids and an array of N salaries where the name, id, and salary of the 𝑖 th index belongs to the same person. Store them in a structure and sort them according to salaries (ascending) and then by ids (ascending). Print the person in the sorted order.

Sample input:

5

Mr. Kamal

Ms. Zara

Nitu Roy

Rakib Hasan

Samira Haque 32 28 29 25 30

165 163 165 178 165


Sample output :

Ms. Zara 163 28

Nitu Roy 165 29

Samira Haque 165 30

Mr. Kamal 165 32

Rakib Hasan 178 25


Write a program to take as input the name, height in cm and age of n employees, and


sorts it according to height in descending order. If two employees have the same height, then it sorts


according to age in descending order. Print the employees in the sorted order.



Sample input:


5


Mr. Kamal


165 32


Ms. Zara


163 28


Nitu Roy


165 28


Rakib Hasan


178 25


Samira Haque


165 28



Sample output:


Rakib Hasan 178 25


Mr. Kamal 165 32


Nitu Roy 165 28


Samira Haque 165 28


Ms. Zara 163 28


2. Vishal is having a bunch of coins ranging from rupees 1 to 10. Help him to write program to find the sum and average of the coins that he is having using while loop.

Solution: 



Write a program to implement the Merge sort algorithm with the space optimization for


auxiliary space O(n/2).

Write a program for Linked-list implementation of a complete binary tree. The program must


have the following functionalities.


a) Insert(): inserts a new ITEM to the complete binary tree. The items are of integer type.


b) Height(): returns height of a node recursively. Height (N) = MAX(Height(L), Height(R))


+ 1. Here, L and R respectively represent the Left child and Right child of node N. Height


of a leaf node is 0.


c) Preorder(): returns the preorder traversal sequence of the binary tree. Use recursive


implementation.


d) Postorder(): returns the postorder traversal sequence of the binary tree. Use recursive


implementation.

6. Integer Pairing

by CodeChum Admin

Now this one's a tad bit tricky, but you can definitely do it!


Instructions:

  1. Input five integers.
  2. Add the 1st and 2nd integers together and store the sum inside a variable.
  3. Add the 3rd and 4th integers together and store the sum inside a variable.
  4. Multiply the two sums and raise the product result to the power of the 5th integer.
  5. Print out the result.

Input


1. First integer

2. Second integer

3. Third integer

4. Fourth integer

5. Fifth integer

Output

The first five lines will contain message prompts to input the five integers.

The line contains the result.

Enter·integer·1:·2
Enter·integer·2:·3
Enter·integer·3:·3
Enter·integer·4:·5
Enter·integer·5:·4
Result·=·2560000





LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS