Explain can you assign a different address to an array tag?
Submitted by: MuhammadNo, although in one common special case, it looks as if you can. An array tag is not something you can put on the left side of an assignment operator. (It's not an "lvalue," let alone a "modifiable lvalue.") An array is an object; the array tag is a pointer to the first element in that object.
For an external or static array, the array tag is a constant value known at link time. You can no more change the value of such an array tag than you can change the value of 7.
Assigning to an array tag would be missing the point. An array tag is not a pointer. A pointer says, "Here's one element; there might be others before or after it." An array tag says, "Here's the first element of an array; there's nothing before it, and you should use an index to find anything after it." If you want a pointer, use a pointer.
Submitted by: Muhammad
For an external or static array, the array tag is a constant value known at link time. You can no more change the value of such an array tag than you can change the value of 7.
Assigning to an array tag would be missing the point. An array tag is not a pointer. A pointer says, "Here's one element; there might be others before or after it." An array tag says, "Here's the first element of an array; there's nothing before it, and you should use an index to find anything after it." If you want a pointer, use a pointer.
Submitted by: Muhammad
Read Online Data Structure Arrays Job Interview Questions And Answers
Top Data Structure Arrays Questions
☺ | What will be output if you will execute following c code? |
☺ | What is Array? |
☺ | What is two-dimensional array? |
☺ | Explain Array of pointers? |
☺ | Tell me why can\'t constant values be used to define an array\'s initial size |
Top Data Structure Categories
☺ | Data Center Manager Interview Questions. |
☺ | Sort And Searching Interview Questions. |
☺ | Creative UI/UX Designers Interview Questions. |
☺ | Data Structure Linked list Interview Questions. |
☺ | Data Structure Arrays Interview Questions. |