Walk Lightly on this PLANET and yet leave such a FOOTPRINT that cannot be erased for thousands of Years..!!!
Visit Codstech for Cyber Security related Posts !

Visitors

Thursday, February 17, 2011

C22 : Declare a memory variable and print its address

Back to Home   &  C


//Declare a memory variable and print its address  by using a pointer variable.

#include<stdio.h>
#include<conio.h>
void main()
{
int n,*p;
clrscr();
p=&n;
printf("Address of variable n=%u",p);
getch();
}
---------------------------------------------------
Output
Address of variable n = 65524
========================================================
Back to Home   &  C

No comments: