333063_OSSP Assignment 5
333063_OSSP Assignment 5
PRN.: 22010373
Batch: C3
CODE :
PART 1 :
#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
#include<sys/shm.h>
#include<string.h>
int main()
int i;
void *shared_memory;
char buff[100];
int shmid;
shared_memory=shmat(shmid,NULL,0);
//this prints the address where the segment is attached with this process
Part 2 :
#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
#include<sys/shm.h>
#include<string.h>
int main()
int i;
void *shared_memory;
char buff[100];
int shmid;
OUTPUT :