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

Using for loop, how to write a program that accepts a positive integer n, representing the number of seconds before the rocket will launch. The program should then output the numbers from n going down to 0. After the line containing the 0, the program should output another line with the words “Blast Off!”

(Sales Commissions) Use a single-subscripted array to solve the following problem. A company pays its salespeople on a commission basis. The salespeople receive $200 per week plus 9% of

their gross sales for that week. For example, a salesperson who grosses $3,000 in sales in a week receives $200 plus 9% of $3,000, or a total of $470. Write a C program (using an array of counters) that determines how many of the salespeople earned salaries in each of the following ranges (assume that each salesperson’s salary is truncated to an integer amount):


a) $200–299

b) $300–399

c) $400–499

d) $500–599


Write a function that calculates the speed of sound (a) in air of a given temperature T (Fahrenheit) which is passed as parameter and returns the speed. Be sure your function does not lose the fractional part of the quotient in the formula shown. Formula to compute the speed in ft/sec:

alpha = 1086sqrt((5T+297)/(247)



Implement the following function which accepts a string as parameter and reverses it, without using any function


from the string library.


void strReverse(char *str)


Pele needs a program to calculate his bank balance at the end of the month. Get his balance at the beginning of the month and his deposit and withdrawal amounts during the month. Bank costs are fixed at R55.66 per month. Calculate and display his balance at the end of the month.

Select the best variable name for the balance at the beginning of the month.


These are the theory questions about Compilers:


1. What is LL1 parsing? Define the meaning of each character of LL1.

2. Which part of a compiler needs to be modified if the precedence of operations changes?

3. Regular languages are closed under regular operations. What does this mean?

4. What is Subset Construction?

5. What is left factoring and why is it applied on Context-Free Grammars?



This is Compilers questions.

True/False questions:

  1. Both compilers and interpreters take source program and user input as their inputs.
  2. The symbol table is ONLY used by the front end part of the compiler
  3. A compiler may report any errors in the source program
  4. The target program produced by a compiler is much slower than an interpreter at mapping inputs to outputs.

Write down the Boolean Table AND the Boolean Expression that models

the circuit that engineers two light switches A and B at the two EXITS

of a huge conference center. The specifications are as follows: (a)

Both light switches operate the one common light in the room.


(b) The light is off when both switches A and B are OFF. That would

mean that A = B = 0 implies the light is OFF = 0.


(c) Flipping either switch will turn the light ON = 1.


(d) Following (c) flipping either switch will turn the light OFF = 0.


(e) We can go back and forth between (c) and (d). Flipping either

switch A or B will turn the light OFF = 0 if it is ON = 1 and ON = 1

if it is OFF = 0. 


Write a program that prints the result of rolling one fair dice.

Hint: use the rand() function with range given in arguments to generate a random integer in the desired range.

Add a loop to print the sum of rolling 10 fair dice.

Add a second loop to repeat this N times, printing the sum after each trial.

Maintain an array count[] so that count[k] stores the number of times the sum is exactly k.

Review your code and eliminate glitches and unnecessary repetitions if any.


Given three variables x, y, z write a function to circularly shift their values to right. In other words if x = 5, y = 8, z = 10 after circular shift y = 5, z = 8, x =10 after circular shift y = 5, z = 8 and x = 10. Call the function with variables a, b, c to circularly shift values. 


LATEST TUTORIALS
APPROVED BY CLIENTS