C program to find substring in a string

C program to find sub-string in a string

Output:

Enter the main string:
CodeRegister
Enter the substring to search:
Re
Substring Re found in CodeRegister

Implementation: