|Suppose we have those inputs |
1. file contains this text:
Recent advances in wireless networking technologies and the growing success of mobile computing devices, such as laptop computers, third generation mobile phones, personal digital assistants, watches and the like, are enabling new classes of applications that present challenging problems to designers. Mobile devices face temporary loss of network connectivity when they move; they are likely to have scarce resources, such as low battery power, slow CPU speed and little memory; they are required to react to frequent and unannounced changes in the environment, such as high variability of network bandwidth, and in the resources availability. To support designers building mobile applications, research 
2. Search keyword: "CPU"
Then the output will be:
The word "CPU" found 1 time
as low battery power, slow CPU speed and little memory; they
i need to use searching algorithms for better performance and needed to get the matched string as it may be scattered across different processes using MPI