Finding word in a two dimensional array

  • Thread starter Thread starter rambo3131
  • Start date Start date
  • Tags Tags
    Array
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 3K views
rambo3131
Messages
18
Reaction score
0
Hi, I have a question about C.In a two dimensional array ,I will search a word (not a letter).Do i have to use pointers?
 
Physics news on Phys.org
rambo3131 said:
Hi, I have a question about C.In a two dimensional array ,I will search a word (not a letter).Do i have to use pointers?
No, you can use array indexes in two nested for loops. Note that you will need to use a string comparison function (strcmp) rather than a condition like this one:
if(str == "abc")