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
Ask the user to input three positive integers M, N and q. Make the 2 dimensional array of integers with size MxN, where all the elements of I (I = 1,…,M) line will be members of geometrical progression with first element equal to the number of line (I) and denominator q.
write a program that reads a series of strings and prints only those strings begging with letter "b"
output for printf("printf");
What output does this program generate as shown? Why? class A { A() { cout << "A::A()" << endl; } ~A() { cout << "A::~A()" << endl; throw "A::exception"; } }; class B { B() { cout << "B::B()" << endl; throw "B::exception"; } ~B() { cout << "B::~B()"; } }; int main(int, char**) { try { cout << "Entering try...catch block" << endl; A objectA; B objectB; cout << "Exiting try...catch block" << endl; } catch (char* ex) { cout << ex << endl; } return 0; }
Write a (n) algorithm that sorts n distinct integers, ranging in size between 1 and kn inclusive, where k is a constant positive integer. (Hint: Use a kn-element array.)
Write a C/C++ program that connects to a MySQL server and displays the global TIMEZONE.
write a program that prompt the user to enter his height and weight,then calculate the body mass index and show the algorithm used
how to take time as input in the format (12:02:13) from user so that controls remains between these columns?
Code for Method of Handling Factorials of Any Size?
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
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.
can you please write a program for deadlock that can detect deadlock and to prevent deadlock.
develop a program to calculate and print body mass index for 200 employees
find level of following tree (state, parent) " J,D I,D H,C E,B F,B G,C B,A D,A C,A A,& K,E L,E L,F M,F N,G O,H P,I P,H Q,I R,J S,K U,P T,L
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; }