What technique does the function use to refer to array elements?
Consider the following function:
void reverse(char *string1, const char *string2)
{
int stringsize{sizeof(string1)/sizeof(char)};
*(string1 + stringsize – 1) = '\0';
string1 = string1 + stringsize – 2;
for (; *string2 != '\0'; string1--, string2++) {
*string1 = *string2;
}
}
a. Array subscript notation.
b. Pointer/offset notation where the pointer is actually the name of the array.
c. Pointer subscript notation.
d. Pointer/offset notation.
You might also like to view...
In a(n) _________ field, values can be chosen from another table or form
Fill in the blank(s) with correct word
If an object of one class is a data member of another class, and the contained object does not have a default constructor, then to call the constructor of the contained object, we should use:
A. dynamic binding B. an initializer list C. polymorphism D. inheritance