subject

Assume that you have two vectors. One vector holds a dictionary of words and/or phrases (represented as strings) and the other vector contains a dictionary of abbreviations for those words (also represented as strings) in the same order. Write a function that reads a file string-by-string and returns the contents of the file to a string, with any abbreviated words or phrases in your dictionary that appear in the input file replaced by the corresponding word or phrase. You may use the following function prototype: string abbrToFull(string filename, vector abbrDict, vector fullDict);
Hint: Suppose your dictionary contains "National Science Foundation" (abbreviated as "NSF") and "Department of Defense" (abbreviated as "DoD"). Then, if the input file contains the following sentence: "UB's Department of Electrical Engineering receives a lot of research funding from the NSF and DoD", the function should return the following string: "UB's Department of Electrical Engineering receives a lot of research funding from the National Science Foundation and Department of Defense". For the toolbar, press ALT+F10 (PC) or ALT+FN+F10 (Mac).

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 02:30
Rafael needs to add a title row to a table that he has inserted in word. what should he do? use the alignment options. use the merge and center option for all the cells in the top row. use the merge and center option on the first two cells in the top row. none of the above
Answers: 3
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 20:00
How much current flows through the alternator brushes? a. 2–5 a b. 25–35 a, depending on the vehicle c. 5–10 a d. 10–15 a
Answers: 2
question
Computers and Technology, 25.06.2019 09:30
Which of the following is a reason to include the people who will be using the new technology in conversations about technology upgrades for a business? a. the users would likely know if an upgrade would be necessary or even useful. b. the users would know more about the software than people in the it department. c. the users will be paying for the upgrades with their own money. d. the users will assume the upgrade will cause a drop in productivity.
Answers: 1
You know the right answer?
Assume that you have two vectors. One vector holds a dictionary of words and/or phrases (represented...
Questions
question
Mathematics, 08.02.2021 01:30
question
Mathematics, 08.02.2021 01:30
question
Mathematics, 08.02.2021 01:30
Questions on the website: 13722363