subject

1. Write a BCPL program that accepts strings from the user and builds them into a binary tree. Whenever the user types * as the input string, your program should print out the entire contents of the tree in alphabetical order, then delete the entire tree, starting again with an empty one.
2. Write your own newvec() and freevec() and demonstrate that they work by using them in your solution to part 1. They don't need to be the most sophisticated newvec and freevec imaginable, but they should at least recombine neighbouring free chunks into one.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 03:10
Fill in the following program so that it will correctly calculate the price of the orange juice the user is buying based on the buy one get one sale.#include //main functionint main() { int cartons; float price, total; //prompt user for input information printf("what is the cost of one container of oj in dollars? \n"); scanf(" [ select ] ["%d", "%c", "%f", "%lf"] ", & price); printf("how many containers are you buying? \n"); scanf(" [ select ] ["%d", "%c", "%f", "%lf"] ", & cartons); if ( [ select ] ["cartons / 2", "cartons % 1", "cartons % 2", "cartons % price", "cartons / price", "cartons / total"] [ select ] ["=", "==", "! =", "< =", "> =", "< "] 0) total = [ select ] ["price * cartons", "cartons * price / 2 + price", "(cartons / 2) * price", "cartons / (2.0 * price)", "(cartons / 2.0) * price + price", "((cartons / 2) * price) + price"] ; else total = ((cartons / 2) * price) + price; printf("the total cost is $%.2f.\n", total); return 0; }
Answers: 2
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. andy received a potentially infected email that was advertising products. andy is at risk of which type of security threat? a. spoofing b. sniffing c. spamming d. phishing e. typo-squatting
Answers: 2
question
Computers and Technology, 23.06.2019 19:30
You can apply several different worksheet themes from which tab?
Answers: 1
question
Computers and Technology, 23.06.2019 20:30
1. for which of the following are you not required to signal beforehand? a. changing lanes b. speeding up c. stopping
Answers: 2
You know the right answer?
1. Write a BCPL program that accepts strings from the user and builds them into a binary tree. Whene...
Questions
question
Mathematics, 14.07.2019 04:22
question
Mathematics, 14.07.2019 04:22
question
Chemistry, 14.07.2019 04:22
question
Mathematics, 14.07.2019 04:22
question
Computers and Technology, 14.07.2019 04:22
question
Mathematics, 14.07.2019 04:22