Read OnLine C- Program Example

07_POINTER (01_POINTER)
PRAC 1 PRAC 2

//wap to print address of the varable
#include<stdio.h>
#include<conio.h>
void main()
{
int i=3;
clrscr();
printf("\n Address of i=%u",&i);
printf("\n Value of i=%d",i);
getch();
}
-------output--------
Address of i=65524
Value of i=3

//wap to print Address of the varable
#include<stdio.h>
#include<conio.h>
void main()
{
int i=3;
clrscr();
printf("\n Address of i=%u",&i);
printf("\n Value of i=%d",i);
printf("\n Value of i=%d",*(&i));
getch();
}
------output--------
Address of i=65524
Value of i=3
Value of i=3

Previous Next
Download Download