ExamVeda
Login
Home
This question belongs to Computer Science Linux
Linux
?

What is the output of this program?
#include<stdio.h>
#include<fcntl.h>
#include<sys/stat.h>
#include<sys/mman.h>
 
int main()
{
    int s_id;
    s_id = shm_open("shared_mem",O_CREAT|O_RDWR,0666);
    printf("%d\n",s_id);
    if(shm_unlink("shared_mem") == -1)
        perror("shm_unlink");
    return 0;
}

Answer & Solution
Correct Answer: Option D
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.