#include #include #include #include #include #include int main () { int shmID; int *s; shmID = shmget(1000,sizeof(int)*3, 0666 | IPC_CREAT); printf("shmID = %d\n",shmID); if(shmID < 0){ printf("error\n"); } s= (int *)shmat(shmID, NULL, 0); s[0]=5; s[1]=6; s[2]=7; printf("Sent values"); shmdt(s); //shmctl(shmID , IPC_RMID, NULL); return 0; }