Hi I am fairly new to C and was wondering if anyone can help me out.

I am trying to take a 2D array and scan for individual letters. I have a hangman game and the program takes a word from words.txt and assings it to the char word[20][30]

For example if the word is "CAT" how can I make the system scan to check if there is an "A" in the word?

Thanks

You can loop through the array comparing the elements to 'A'.
Use two loops for a 2D array.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.