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, 24.06.2019 02:20
Peter is thinking of a number which isless than 50. the number has 9 factors.when he adds 4 to the number, itbecomes a multiple of 5. what is thenumber he is thinking of ?
Answers: 1
question
Computers and Technology, 24.06.2019 10:00
In which view can you see speaker notes?
Answers: 1
question
Computers and Technology, 24.06.2019 18:00
Your computer running windows 10 is doing some very strange things with the operating system. you are fairly certain it is not a hardware issue. you need to try to get further insight into what is going on within the operating system. which tool would be best-suited for this?
Answers: 1
question
Computers and Technology, 24.06.2019 21:30
Write an algorithm to check if a number is even or odd and show with flow chart step by step
Answers: 2
You know the right answer?
Assume that you have two vectors. One vector holds a dictionary of words and/or phrases (represented...
Questions
question
History, 06.06.2021 02:20
Questions on the website: 13722367