Computer Science, asked by vihitha2062, 1 year ago

Write a program to determine if the given word is present in the string.

Answers

Answered by mersalkeerthi46
0

C program to check if the substring is present in the given string

Check if a sub string present in a given string

#include<stdio.h> #include<conio.h>

void main() { char str[80],search[10]; ...

clrscr();

puts("Enter a string:"); gets(str);

puts("Enter search substring:"); gets(search);

while (str[count1]!='\ 0') count1++;

while (search[count2]!='\ 0') ...

for(i=0;i<=count1-count2;i++) {

Similar questions