#include #include #include #define SHMSZ 27 main() { char c, *shm, *s; int chave= 5678, shmid; shmid= shmget(chave, SHMSZ, 0666); shm= (char *)shmat(shmid, NULL, 0); for (s=shm; *s!='\0'; s++) /* lę da memória partilhada*/ putchar(*s); putchar('\n'); *shm='*'; /* alterar o 1o. caracter em memória */ exit(0); }