Wednesday, February 23, 2011

Address of a variable in c


Location in a memory where a variable stores its data or value is known as address of variable. To know address of any variable c has provided a special unary operator & which is known as deference operator or address operator. It operator is only used with variables not with the constant. For example:



#include

int main(){

int a=5;

printf("Address of variable a is: %d",&a)

No comments:

Post a Comment