easy c question: compare first char of a char array

Posted by nunos on Stack Overflow See other posts from Stack Overflow or by nunos
Published on 2010-05-29T21:36:27Z Indexed on 2010/05/29 21:42 UTC
Read the original article Hit count: 144

Filed under:
|
|

How can I compare the first letter of the first element of a *char[]?

I have done

if (foo[0][0] == 'c')

but that gives a segmentation fault

© Stack Overflow or respective owner

Related posts about c

    Related posts about beginner