Finding word in a two dimensional array

  • Thread starter rambo3131
  • Start date
  • #1
18
0

Main Question or Discussion Point

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?
 

Answers and Replies

  • #2
33,632
5,287
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")
 

Related Threads on Finding word in a two dimensional array

Replies
4
Views
2K
Replies
7
Views
4K
  • Last Post
Replies
15
Views
3K
Replies
6
Views
4K
Replies
4
Views
8K
  • Last Post
Replies
11
Views
2K
Replies
3
Views
3K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
9
Views
2K
Top