首页 > 解决方案 > Playing with pointer in c language

问题描述

Could we point and address specific place in memory using pointer in c language? Then modify it from another file (ANOTHER PROGRAM) and view it from any where. Like :

Modifying it :

#include<stdio.h>

void main(){


   int *p;
   p= 12345678;
   scanf("%d",p);

}

Viewing it :

#include<stdio.h>

void main(){


   int *p;
   p= 12345678;
   printf("%d", *p);

}

标签: cpointersmemoryheap-memory

解决方案


No. Each process in your operating system has its own address space.
Processes can communicate, using the channels provided by the operating system.
Look into IPC, aka inter process communication, if you're interested in knowing more about it.


推荐阅读