The %c modifier is typically used in case of character, in case you want to fetch just a single character.
%s is used to fetch a string or group of characters Lets for the sake of ease of understanding, We take 2 string of character type arrays.
One of the array of string type char str[] will hold the original string.
The second array which hold the substring which the user input to check from their end if the substring exists or not.
Also lets declare a flag variable "found" of type int as boolean types are not part of C.
The code is attached in image format as per your reference. Click on the link