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);
   
}
తెరమీద 
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

కామెంట్‌లు

ఈ బ్లాగ్ నుండి ప్రసిద్ధ పోస్ట్‌లు

100% C prog to write content into a file and then read it back onto the console

Spic macay

శ్రీరస్తు.. రామలింగ 18-1-24 (సూరసాని వారి ఆహ్వానము)