Have a Read!

Hi Everyone.
The idea for this page is to provide new c users simple c tutorials to learn how to develop the logic and more importantly correct way to write syntax.
ENJOY !!!

Sunday, February 6, 2011

How to use strchr

#include<stdio.h>
#include<string.h>
int main()
{
const char *s="Thats how it is done";
char c='u';
if (strchr(s,c)!=NULL)
{printf ("found\n");}
else
{printf("not found\n");}
}

No comments:

Post a Comment

Related Posts with Thumbnails