Address Operators

Back - C Language Notes By Vivek Sir email: vivekdubey22@gmail.com (w) 9826424484

C Language Video
  1. Pointer address operator is denoted by ‘&’ symbol
  2. When we use ampersand symbol as a prefix to a variable name ‘&’, it gives the address of that variable.

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

 

Back - C Language Notes By Vivek Sir email: vivekdubey22@gmail.com (w) 9826424484

C Language Video