#include <stdio.h>
#include<string.h>
int main() {
char c='o';
int contains=0;
char str[]="Shobhit";
for(int i=0;i<56;i++)
{
printf("Thie is nice character \n");
}
for(int i=0;i<strlen(str);i++)
{
if (str[i]==c){
contains=1;
break;//this break statement will exit the loop once the character is found!
}
}
if (contains){
printf("Yes it contains!\n");
}
else{
printf("Does not contain!\n");
}
return 0;
}
To embed this program on your website, copy the following code and paste it into your website's HTML: