79160078

Date: 2024-11-05 17:17:45
Score: 1
Natty:
Report link

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

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Sankalp Mathur