C Program to Search occurrence of Character in String

Search whether character is present in the string or not :

Logic [ Algorithm ]

  1. Accept the String from the user.
  2. Also Accept the character to be searched
  3. String is stored as array of character , then scan each array element with entered character.
  4. If it matches then increment the Counter by 1 else go for another character.

Output :

[toggle title=”Download Program”]Download[/toggle]