Clearly, it is inappropriate to use the label,
"attack." In this case, the proper label is simply,
"bug!"
Quote:
It is an assignment. I just am supposed to name the uncontrolled or unexpected result that could come out of using pointers the same as arrays.
|
The two declarations, first of all, "are
fundamentally different." (Hence, they would not and in fact
cannot(!) be used together.) So, the locus of the question-at-hand really is:
"what bugs might occur if the second declaration were used by the programmer, versus the first?"
Remember that the "C" language
is purposely designed(!) "to be permissive." It always assumes that you know what you are doing. Therefore, it
purposely allows "array-dereference" syntax to be applied to "pointers," and so-on.
This question is therefore challenging you, first and foremost,
to understand(!) the difference between the two declarations, and then to comment on the "gotchas" that might arise from the simple fact that,
"in C, the syntax might be the same."
So, now, "as the writer of the assignment intended for you to do,"
contemplate what I have just said.
(Because, if someday in some future job you are "hip-waders deep in 253,000 lines of mission-critical C-code that was first written 35 years ago ..." [and this most-certainly can happen]
"... you will thank me.") (No, it is
not too late to change majors ...)
---
"Who,
me?" A sometimes community-college
instructor? "Who,
me?" 