Tag Archives: C Program Find Substring Index in String

C Program Find Substring Index in String

C Program Find Substring Index in String /* C program to input Source string and a search substring to be searched in first string. And displaying found or not, using string function strstr(). */ #include <stdio.h> #include <string.h> int main() { char str[100]; char search[50]; char *ptr; printf("Enter a string:\n"); gets(str); printf("Enter search substring:\n"); gets(search);… Read More »

Loading