2 Answers
New AnswerWhat is a variable? A variable is a piece of memory that stores a value (numbers or strings). for example - int a = 5 // a is variable. now What is a pointer? A pointer is address of the memory (in RAM) where variable is saved. An example - int a = 5 ; cout<< a ; //prints 5 cout << &a ; //prints address of variable a. here & operator is called reference operators. read this http://www.learncpp.com/cpp-tutorial/6-8-pointers-and-arrays/
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message