B
b4283
Hi,
I've encountered some confusing questions while reading k&r ed2.
Around page 128, in the book, has introduced an "hash-search
algorithm", while they uses hash(s) which is the hashed number of an
string, as the array index, this had raised my question: doesn't array
indexes have to start from 0 to (i-1), but random assigning index is
possible in the book?
and I also tried to practice this with a simple struct, but i always
get a segmentation fault running it.
the 2nd question is that it seems that the "next" pointer points to
itself in the array, this doesn't make any sense does it ?
I've encountered some confusing questions while reading k&r ed2.
Around page 128, in the book, has introduced an "hash-search
algorithm", while they uses hash(s) which is the hashed number of an
string, as the array index, this had raised my question: doesn't array
indexes have to start from 0 to (i-1), but random assigning index is
possible in the book?
and I also tried to practice this with a simple struct, but i always
get a segmentation fault running it.
the 2nd question is that it seems that the "next" pointer points to
itself in the array, this doesn't make any sense does it ?