Knowing the length of the char array, you can loop through it with a for loop.
for (int i = 0; i < myStringLen; i++) { if (a[i] == someChar)
Remember that char * can be used as a C-Style string. And a string is just an array of characters, so you can just index it.
EDIT: since I was asked for comments, see section 5.3.2 of this link for more information on arrays and pointers: http://publications.gbdirect.co.uk/c_book/chapter5/pointers.html
source share