Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is the difference between int &r and int& r

Answer Posted / nakubu

There is no difference; C++ is pretty much whitespace
agnostic. What depends is its use:

int function(int &r)
{
...
}

is a function declaration that accepts an integer pointer as
a parameter, and:

int a = 7;
int &r = a;

will make a reference to an integer.

The spacing around the & makes no difference.

Is This Answer Correct ?    13 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

solve the problem in the programming language C++"if a five digit number is input through the keyboard.Write a program to calculate the sum of its digits(hint: use the modulus operator)

3357


write a program that prompt the user to enter his height and weight,then calculate the body mass index and show the algorithm used

4815


write a program that reads a series of strings and prints only those strings begging with letter "b"

3068


i really need help about this.. write a program to display the set of odd and even numbers separately. find the highest and lowest value of the given numbers.

2644


i don't know about working of nested for loop can any one help me

2217


Write a simple encryption program using string function which apply the substitution method.

6050


How to swap two ASCII numbers?

2965


Write a program that print in screen a tree with its height taken from user by entering number of 4 digits and find the odd numbers then calculate the sum of odd numbers so he get the height of tree?

3313


how to take time as input in the format (12:02:13) from user so that controls remains between these columns?

2223


Code for Method of Handling Factorials of Any Size?

2425


write a program using virtual function to find the transposing of a square matrix?

3305


what mean void creat_object?in public class in this code class A{ public: int x; A(){ cout << endl<< "Constructor A";} ~A(){ cout << endl<< "Destructor A, x is\t"<< x;} }; void create_object(); void main() { A a; a.x=10; { A c; c.x=20; } create_object(); } void create_object() { A b; b.x=30; }

2528


write a function that allocates memory for a single data type passed as a parameter.the function uses the new operator and return a pointer to the allocated memory.the function must catch and handle any exception during allocation

2839


Code for Easily Using Hash Table?

2959


How to Split Strings with Regex in Managed C++ Applications?

3595