why we cant create array of refrences
Answers were Sorted based on User's Feedback
Answer / o saienni
You cannot have a pointer to a reference.
In other words
int &* isn't allowed.
using:
int nArray[3];
The variable nArray is infact a pointer to an array or an
int pointer and the [] will find the offset within that
array. So an array of references will be a pointer to a
reference and this is why it's not allowed.
| Is This Answer Correct ? | 6 Yes | 2 No |
Answer / som shekhar
Since References are not objects and they dont have any
storage of their own , they always refer to the existing
object. Therefore it doesn't make sense to have an array of
reference.
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / narender vadhava
in array like a[50];
[] = subscript caller
this subscript caller is use to increment the pointer of
variable or say offset of the variable not to increase the
value so we cant crate array of refrences.
| Is This Answer Correct ? | 1 Yes | 1 No |
Can we remove an element in a single linked list without traversing? Lets suppose the link list is like this 1 2 3 4 5 6 We need to remove 4 from this list (without traversing from beginning) and the final link list shud be 1 2 3 5 6 only thing we know is the pointer to element "4". How can we remove "4" and link "3" to "5"?
What are enumerations?
Adobe Interview & Adobe Placement Paper
Is there something that we can do in C and not in C++?
To what does “event-driven” refer?
What is the difference between c++ and turbo c++?
Write a Program for read a line from file from location N1 to N2 using command line arguments. Eg:exe 10 20 a.c
What is class invariant?
How would you stop a class from class from being derived or inherited?The constructer should not be Private,as object instantiation should be allowed.
Differentiate between realloc() and free().
What is operators in c++?
How can a called function determine the number of arguments that have been passed to it?