strchr function is used to get the first occurrence of any character in any string.
Example:
#include<stdio.h>
#include<conio.h>
#include<string.h>
main()
{
char name[]="this is a string";
char *c;
clrscr();
c=strchr(name,'s');
printf("found s at \"%s\"\n",c);
getch();
}
Example:
#include<stdio.h>
#include<conio.h>
#include<string.h>
main()
{
char name[]="this is a string";
char *c;
clrscr();
c=strchr(name,'s');
printf("found s at \"%s\"\n",c);
getch();
}