answersLogoWhite

0


Best Answer

The ampersand '&' has many uses in the C++ language:

The single ampersand can be used to reference the pointer address of a pointer:

int* pointer;

int* anpointer;

anpointer = &pointer;

This example, although perhaps not valid, shows that the anpointer reference is now the same as the reference to the pointer memory address.

The single ampersand can also be used to reference an object in a function:

void function( int param1, int param2, int &reference );

If this function were to be called, and the reference object altered within the function, the actualy object that was passed into the function would be altered.

The double ampersand '&&' specifies that the left AND the right concepts must both be true before the whole statement is true. For example:

if( conceptA true )

{

conceptC = true;

}

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

The '&' symbol when used before a variable name returns the address of the memory location in which the contents of the variable are stored. Hence it is widely used in pointer manipulations and in inbuilt functions like scanf which require memory address to be passed as argument.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

its the address symbol

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

It is the 'address of' operator.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is ampersand in C Language?
Write your answer...
Submit
Still have questions?
magnify glass
imp