MCQ Practice

What is the output of this program? #include #include #include #include #include int main() { int s_id; s_id = shm_open("shared_memory",O_TRUNC,0666); if(s_id == -1) perror("shm_openn"); return 0; }

A

this program will give an error because OTRUNC is not a valid flag

B

this program will give an error

C

this program will give segmentation fault

D

none of the mentioned

Correct Answer: B