3 votes 3 votes Is call by address in C same to call by reference in C++? if not then whats basic difference ?? and why doesn't C have a refernce variable just like C++?? Programming in C programming-in-c + – Himanshu Goyal asked Aug 27, 2016 • edited Aug 27, 2016 by Arjun Himanshu Goyal 632 views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply pC commented Aug 27, 2016 reply Follow Share Out of GATE 2017 syllabus , right ? 1 votes 1 votes Himanshu Goyal commented Aug 27, 2016 reply Follow Share C programming is there in gate 2017 i was studying that so i got a question so i asked :) 0 votes 0 votes Himanshu Goyal commented Aug 27, 2016 reply Follow Share @Gabbar thanks a lot but what is the ans of this question Is call by address in C same to call by reference in C++? 0 votes 0 votes Please log in or register to add a comment.
Best answer 3 votes 3 votes A pointer can be re-assigned any number of times while a reference can not be re-seated after binding. Pointers can point nowhere (NULL), whereas reference always refer to an object. You can't take the address of a reference like you can with pointers. There's no "reference arithmetics" (but you can take the address of an object pointed by a reference and do pointer arithmetics on it as in &obj + 5). you can have pointers to pointers to pointers offering extra levels of indirection. Whereas references only offer one level of indirection. A pointer is a variable that holds a memory address. Regardless of how a reference is implemented, a reference has the same memory address as the item it references. http://yosefk.com/c++fqa/ref.html papesh answered Aug 27, 2016 • selected Nov 26, 2016 by Sanjay Sharma papesh comment Share Follow See all 0 reply Please log in or register to add a comment.