rambo3131
- 18
- 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?
The discussion centers on searching for a word in a two-dimensional array using the C programming language. It is established that pointers are not necessary for this task; instead, array indexes can be utilized within two nested for loops. The string comparison function strcmp is recommended for comparing strings, as direct comparison using str == "abc" is incorrect.
strcmpstrcmp and strcpyC programmers, computer science students, and software developers interested in efficient string searching techniques within arrays.
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: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?