strstr() function is used to get the first occurrence of the string in other string.
Example:
#include<stdio.h>
#include<conio.h>
#include<string.h>
main()
{
char name[100]="my name is aadarsh";
char wname[100]="my website name is errorless-c.blogspot.com";
clrscr();
printf("string 1: %s",strstr(name,"is"));
printf("\nstring 2: %s",strstr(wname,"is"));
getch();
}
Example:
#include<stdio.h>
#include<conio.h>
#include<string.h>
main()
{
char name[100]="my name is aadarsh";
char wname[100]="my website name is errorless-c.blogspot.com";
clrscr();
printf("string 1: %s",strstr(name,"is"));
printf("\nstring 2: %s",strstr(wname,"is"));
getch();
}