strchr() function in C by R4R Team

-strchr() is a string function that are able to return the subset of the string after any character

Syntax-
strchr(string,char)
-Here it return the data of string read from that character.

program-

#include< stdio.h>
#include< string.h>
int main()
{
char s[20];
//input of string
printf("Enter string\n");
scanf("%s",&s);
printf("%s ",strchr(s,'a'));
printf("%s ",strchr(s,'i'));
printf("%s ",strchr(s,'p'));
}


output-

Enter string
This_is_a_program
a_program
is_is_a_program
program




Leave a Comment:
Search
Categories
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!