nord vpnnord vpn
Ad

Untitled

mail@pastecode.io avatar
unknown
plain_text
6 months ago
362 B
1
Indexable
Never
#include<stdio.h>
#include<stdlib.h>
#include<sys/shm.h>
#include<unistd.h>
#include<string.h>
void main()
{
	char str[100];
	int shmid=shmget((key_t)2366,1024,0666|IPC_CREAT);
	printf("Key of shared memory is %d\n",shmid);
	void *shm=shmat(shmid,NULL,0);
	printf("Process is attached at %p\n",shm);
	printf("Value read from shared memory is %s\n",(char*)shm);
}

nord vpnnord vpn
Ad