Suppose I have a string entered by the user asdfgh\hj
, and I wish to find out the index of \
character in a String. How I can do it in C?
I tried strchr()
function as strchr("asdfgh\hj",'\')
but compiler throws an error.
Then I used ==
operator but same problem with it — again the compiler throws an error.