2

Possible Duplicate:
why does strchr take an int for the char to be found?

char *strchr(const char *string, int c);

why does strchr() takes int type in C ? and how it works?

Community
  • 1
  • 1
sarsarahman
  • 1,078
  • 5
  • 11
  • 26
  • 2
    Quote from the manpage: `The strchr() function locates the first occurrence of c (converted to a char) in the string pointed to by s.` So it just casts the `int` down into a `char`, really. – zneak Dec 11 '11 at 05:22
  • answered [here](http://stackoverflow.com/q/2394011/1073981). – Abhishek Chandel Dec 11 '11 at 05:29

0 Answers0