Address Operators
lets take an example –
&n
- It gives an address on
variable n
Working of address operator
#include<stdio.h>
void main()
{
int n = 10;
printf("\nValue of n is : %d",n);
printf("\nThe address of n is %u",&n);
printf("\nValue of n is : %u",*(&n));
}
Output :
Value of n is : 10
The address of n is : 65524
Value of n is : 10
Pointer
Operator in C Program
|
Operator |
Operator
Name |
Purpose |
|
* |
Value
at Operator |
Gives
Value stored at Particular address |
|
& |
Address
Operator |
Gives
Address of Variable |