Finding Similarity. For example, consider the case where the string length is 6
ID: 640606 • Letter: F
Question
Finding Similarity.
For example, consider the case where the string length is 6 and you have the following 3 files:
abc.txt
def.txt
ghi.txt
You would want to create some sort of data structure (array, table, tree, list) containing all existing 6-character strings, and for each one of them the files in which that string is found. One way (but almost surely not the best way) is to think of this as a giant matrix, with the rows representing all existing 6-character strings, and the columns representing all 3 files. When you read input you should make the following adjustments:
For instance if the 3 files contained:
Part of this matrix might look like:
Filename File Contents abc.txt In this story there are 3 men in a boat. def.txt The seventh is surely the best. ghi.txt O the glint, his sword shone in the moonlight.Explanation / Answer
#include #include int main() { char str[6], file_name[25],ch; int i,j,len=6; printf(
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.