I'm trying to find out how many times a character appear in a string.
For example:
char * line = "cat file1 | grep c | wc"
how can I find the number of times character '|' appear in the string?
I also have another question:
Is there a way to find if a string contain special character?
EX: "netbean&"