What are the difference between reference variables and pointers in C++?
Answer Posted / hrpynux@gmail.com
Pointers: A pointer is a variable that holds memory address of another variable. ... References : A reference variable is an alias, that is, another name for an already existing variable. A reference, like a pointer, is also implemented by storing the address of an object.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
how can i access a direct (absolute, not the offset) memory
address?
here is what i tried:
wrote a program that ask's for an address from the user,
creates a FAR pointer to that adress and shows it. then the
user can increment/decrement the value in that address by
pressing p(inc+) and m(dec-).
NOW, i compiled that program and opened it twice (in 2
different windows) and gave twice the same address to it.
now look what happen - if i change the value in
one "window" of the program, it DOES NOT change in the
other! even if they point to the same address in the memory!
here is the code snippet:
//------------------------------------------------------
#include
What are c++ templates used for?
What is the maximum value of a unsigned char a) 255 b) 256 c) 128
What are associate containers?
What is the size of integer variable?
Explain the isa and hasa class relationships.
Will c++ be replaced?
Explain about templates of C++.
What is the hardest coding language to learn?
What is a storage class used in c++?
What is #include ctype h in c++?
Differentiate between realloc() and free().
Can we change the basic meaning of an operator in c++?
What is a unnitialised pointer?
What is #include cstdlib in c++?