What is the difference between reference and pointer?



What is the difference between reference and pointer?..

Answer / Aashish Mohan Richhriya

A reference is an alias for an existing variable, while a pointer is a variable that stores the memory address of another variable. References are implicitly initialized and cannot be null, while pointers can be null. Also, references have no size, but pointers have a size.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

what Is DCS ? what i will get benefit when i did?

1 Answers  


How can you quickly find the number of elements stored in a a) static array b) dynamic array ? Why is it difficult to store linked list in an array?how can you find the nodes with repetetive data in a linked list?

1 Answers  


what are Access specifiers in C++ class? What are the types?

1 Answers  


Can we define function inside main in c++?

1 Answers  


What is the outcome of cout< a) 16 b) 17 c) 16.5

1 Answers  


Write a program to calculate the following i want a c++program for this condition 1+4+9+16+….+100 Like this (1^2+2^2) Hint use function pow(a,b)

4 Answers   HTC, TCS,


What is the difference between the compiler and the preprocessor?

1 Answers  


What is a syntax in c++?

1 Answers  


Which uses less memory? a) struct astruct { int x; float y; int v; }; b) union aunion { int x; float v; }; c) char array[10];

4 Answers   Quark,


What is c++ course?

1 Answers  


Define a nested class. Explain how it can be useful.

1 Answers  


What is a block in c++?

1 Answers  


Categories