Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use C with stdio.h File Bibi is asked to translate short words to their original words that is stored in testdata.in with the file format

Use C with stdio.h

File Bibi is asked to translate short words to their original words that is stored in testdata.in with the file format as follows: Number of data in the dictionary Short word#Original word Number of test cases String sentence Bibi is asked to display the original sentence according to the dictionary. If there is a word that does not exist in data dictionary, then display the inputted word unchanged. Format Input The first line contains an integer T stating the number of data in the dictionary. Next T lines are the data in the dictionary where each line contains a short word and long word separated by #. The following line contains integer TC stating the number of test cases. Each test case consists of a sentence. Format Output Output consists of T lines where each line has the format Case #X:, where X is the test case number starting from 1 and then followed by a newline. For each test case, output a sentence that is already translated according to dictionary given in testdata.in. Constraints 1 T 100 1 T C 100 1 |Sentences in TC| 100 1 |Short Word, Original Word| 50

Sample Input (testdata.in) 20 mkn#makan sy#saya ak#aku mw#mau km#kamu tdr#tidur tdk#tidak tp#tetapi bljr#belajar pk#pakai syr#sayur ns#nasi aym#ayam bngng#bingung ssh#susah klo#kalau skt#sakit bs#bisa sk#suka akn#akan 4 sy tdk sk mkn syr pk ns km harus bljr klo mw pintar sy ssh tdr klo sedang bngng bljr matematika sy sk makan ns pk syr Sample Output (standard output) Case #1: saya tidak suka makan sayur pakai nasi Case #2: kamu harus belajar kalau mau pintar Case #3: saya susah tidur kalau sedang bingung belajar matematika Case #4: saya suka makan nasi pakai sayur Note Even though it is not stated explicitly, you should know by now that excessive space / newline are treated as WRONG ANSWER.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Development Of Knowledge Framework For Affective Content Analysis

Authors: Swarnangini Sinha

1st Edition

B0CQJ13WZ1, 979-8223977490

More Books

Students also viewed these Databases questions

Question

Contrast parental and peer influences during adolescence.

Answered: 1 week ago

Question

Explain the steps involved in training programmes.

Answered: 1 week ago

Question

What are the need and importance of training ?

Answered: 1 week ago

Question

What is job rotation ?

Answered: 1 week ago

Question

Define procedural justice. How does that relate to unions?

Answered: 1 week ago