100% రెండు pointers pointing to same memory location
#include<stdio.h>
void main()
{
int *p,*z;
int i=4;
p=&i;
z=&i;
printf("value in the location to which pointer p is pointing= %d",*p);
printf("\n the address to which pointer is pointing=%u",p);
printf("\naddress of i is %u",&i);
printf("value in the location to which pointer z is pointing= %d",*z);
printf("\n the address to which pointer is pointing=%u",z);
}
void main()
{
int *p,*z;
int i=4;
p=&i;
z=&i;
printf("value in the location to which pointer p is pointing= %d",*p);
printf("\n the address to which pointer is pointing=%u",p);
printf("\naddress of i is %u",&i);
printf("value in the location to which pointer z is pointing= %d",*z);
printf("\n the address to which pointer is pointing=%u",z);
}
తెరమీద
value in the location to which pointer p is pointing= 4
the address to which pointer is pointing=2148481548
address of i is 2148481548value in the location to which pointer z is pointing= 4
the address to which pointer is pointing=2148481548
the address to which pointer is pointing=2148481548
address of i is 2148481548value in the location to which pointer z is pointing= 4
the address to which pointer is pointing=2148481548
కామెంట్లు
కామెంట్ను పోస్ట్ చేయండి
దయచేసి మీ సలహాలను సూచనలను స్పష్టంగా పేర్కొనగలరు. plz see that ur comments are 'acceptable' in a value based society.