4 4 votes Which of the following is true with respect to Reference? A reference can never be NULL A reference needs an explicit dereferencing mechanism A reference can be reassigned after it is established A reference and pointer are synonymous Programming in C programming isro2014 pointers + – ajit 6.5k views answer comment Share Follow Print See 1 comment 1 1 comment reply Devwritt commented Jul 1, 2016 reply Follow flag https://gateoverflow.in/tag/isro2014?start=60/ 0 0 replyShare Please log in or register to add a comment.
Best answer 20 20 votes A) References cannot be null,every reference refers to some object, although it may or may not be valid. B) Reference doesn't need an explicit dereferencing mechanism C) Once a reference is created, it cannot be later made to reference another object. D) They are entirely different concept. Pointer stores the address whereas Reference is an alias of some variable. https://en.wikipedia.org/wiki/Reference_(C%2B%2B) Aditya answered Sep 23, 2015 • selected Jun 7, 2016 by Arjun Aditya comment Share Follow See all 4 Comments 4 4 Comments reply sh!va commented Jun 7, 2016 reply Follow flag Pointer Reference Used in C to refer an address int A = 5; int *ptr = &A; Special datatype used in C++ to refer an object int A = 5; int& rA = A; A pointer can be reassigned after it is established A reference cannot be reassigned after it is established Can be null Cannot be null Hence answer is A Hope this comparison will give clarity 8 8 replyShare Arjun commented Jun 7, 2016 reply Follow flag Pointer is also in C++. 2 2 replyShare Shubhanshu commented May 4, 2017 reply Follow flag is it only the case of c and c++ ?? as in java we dont have pointers but we have ref ryt ?? and null can be assign them... 1 1 replyShare surajgarg1234 commented Jan 2, 2020 reply Follow flag Why are assuming reference in C++ because in question it is not written 0 0 replyShare Please log in or register to add a comment.
0 0 votes like that can u provide link for ISRO-2015?? cse23 answered Jul 2, 2016 cse23 comment Share Follow 0 reply Please log in or register to add a comment.