I started my c lessons 2 weeks ago and i have a project to do. This project is quite difficult for a beginner like me. I have to make a program that receives an arbitrary number of words and a text, searches those words in the text, and then returns every line where it found at least one of the words. It should work similary to this: promp> program.c word1 word2 …wordn < text.txt. The program cannot manipulate files, due to the “< text.txt” thing , it has to work as if the text was written in the command line. As obvious, I thought in many solutions for this problem, but I´m having a lot of trouble implementing them. I think that the best solution(since i´m supposed to use getchar() and putchar() everywhere) would be to read char by char and then write every char in a vector until it gets to the end of the line. After that, it compares the words received in the command line with those in the vector. If it has at least one match, a counter is incremented, and if the counter is > 0,the line is shown as expected. It seems logical, but i´m having a lot of trouble implementing this solution. If someone can help me, give me some hints, or even give me some idea of a possible solution, it would be really helpful. Hope someone can help me!