Capgemini Engineering Interview Question

Given a pattern and a text, write a program to check whether the pattern is present in the text