As with any other programming task you need to divide the problem into smaller pieces.
1. Split up the text into paragraphs.
You already know there are 3 of them, but you need to find out what separates the paragraphs.
Have a look at a dot (.) followed by a line feed (\n) or carriage return + line feed (\r\n).
Here
strtok()[
^] could be used.
2. Now you can use a loop and search through each paragraph for your key words.
You can use
strstr()[
^] in a loop until the function returns NULL.
Do this for each keyword.
Hint. Don't look for the letter 'a' only, look for " a " (spaces on each side).
Using Regular Expressions would solve this problem in a breeze, but that is probably a bit too advanced.
This should help you getting started.