Concept of pointer.
#include <stdio.h>
#include <conio.h>
void main ( )
{
int n, *p;
p = &n;
n = 5;
clrscr ( );
printf("\n\n\n\t\t Number is %d Stored at Address %u", n, &n );
printf("\n\n\t\t Number is %d Stored at Address %u", *p, p );
printf("\n\n\t\t Address is %u Stored at Address %u", p, &p );
getch ( );
}
Click here to contact us
#include <stdio.h>
#include <conio.h>
void main ( )
{
int n, *p;
p = &n;
n = 5;
clrscr ( );
printf("\n\n\n\t\t Number is %d Stored at Address %u", n, &n );
printf("\n\n\t\t Number is %d Stored at Address %u", *p, p );
printf("\n\n\t\t Address is %u Stored at Address %u", p, &p );
getch ( );
}
Click here to contact us
No comments:
Post a Comment