What is the difference among a pointer and a reference?, C/C++ Programming

A: A reference has to always refer to some object and, so, must always be initialized; pointers do not have such limits. A pointer may be reassigned to point to distinct objects whereas a reference always refers to an object along with which it was initialized.

 

Posted Date: 3/19/2013 9:02:16 AM | Location : United States







Related Discussions:- What is the difference among a pointer and a reference?, Assignment Help, Ask Question on What is the difference among a pointer and a reference?, Get Answer, Expert's Help, What is the difference among a pointer and a reference? Discussions

Write discussion on What is the difference among a pointer and a reference?
Your posts are moderated
Related Questions
Aim: To implement a program to add two polar coordinates using operator overloading. Code:                       #define PI 3.14 class polar {             double

program to convert string from super ascii string with minimum cost

Explain the working of Array with Strings? A string is defined in C language as an array of characters. A null character (‘\0') is automatically added to the end of the charact

write a program that calculates points along a rhodonea curve.... ? int fillArray( double data[ ], int nValues, double min, double max ); o Used to fill in the theta array. Return

padovan string c++ program

#include #include #include #include #include class Employee { private: char *Name; //Set them as pointers... int IdNumber; char *Department; char *Position; public: voi

Write a function to calculate the exchange rate of pounds to dollars  Answer       Td = 2xTp   The parameter passed over is the number of pounds and returned the value in do

C Program for REMOVING CHAR WHICH U WANT void main() {           int i,j;           char a[100],r;           clrscr();           for(i=0;i

A: BinarySearchTree.h ---------------------- #ifndef BINARY_SEARCH_TREE_H_ #define BINARY_SEARCH_TREE_H_ #include "dsexceptions.h" #include // For NULL // Binary

What if I cannot wrap the local in an artificial block? need help on Artificial Block in c++.