Feed Headline Animator

Explain the address of operator

Address of operator: -

In C language the ampersand operator i.e. & is called addresses of operator. It is used proceeding with the variable name. It would seem more reasonable to use the name of the variable enough with out the ampersand as we did in printf ( ) statement. However the C language compiler requires the arguments to scanf ( ) to be the addresses of variables, rather then the variables themselves.
In other words we can say every variable name occupies a certain location in the memory and the first character (byte) it occupies is the address of that variable. There fore C language compiler provides ampersand to be places as a prefix with the variable name to over come this problem.


Posted by: Wasim Javed

No comments:

Post a Comment