Question: Hello, Can someone help me fix the error please #include #include #include #include int main() { const int SIZE = 4096; const char *name =

Hello, Can someone help me fix the error please

#include

#include

#include

#include

int main()

{

const int SIZE = 4096;

const char *name = "OS";

const char *message_0 = "Hello";

const char *message_1 = "world!";

int fd;

char *ptr;

fd = shm_open(name, O_CREAT | O_RDWR, 0666);

ftruncate(fd, SIZE);

ptr = (char * )

mmap(0, SIZE, PROT_READ, MAP_SHARED, fd, 0);

sprintf(ptr, "%s", message_0);

ptr += strlen(message_0);

sprintf(ptr, "%s", message_1);

ptr += strlen(message_1);

return 0;

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!