Questions: 1 680

Answers by our Experts: 1 680

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 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


Compare the methods of determining prime numbers with code and concept.

i.Naive method

ii.square root method

iii.Seive of Eratosthenes


Write a program with analysis to sort in descending manner using 'p' number of values and analyze the complexity.(bubble sort)




Write a C program for the Fibonacci series of n numbers using array.

    Fi = F(i-1) + F(i-2)

 Example: if n =5

F1 = 1 

F2 = 1       

F3 = F2+ F1 = 1 + 1 = 2

F4 = F3 + F2 = 2 + 1 = 3

F5 = F4 + F3 = 3 + 2 = 5


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?



LATEST TUTORIALS
APPROVED BY CLIENTS