/*A program to show hw type of pointer is being changed ...& value is printed after accessing any memory*/
//read from memory operation is being performed here
#include<stdio.h>
#include<stdlib.h>
#include<sys/ipc.h>
#include<sys/types.h>
#include<sys/shm.h>
int main()
{
int *a;
int kid;
kid=shmget(555,16,666|IPC_CREAT);
printf("kid=%d\n",kid);
a=shmat(kid,(int*)0,0);//any type of pointer is written into that memory ...type of pointer may be changed & value by that pointer may be accessed by changed pointer