CS604 Assignment 2 Spring 2021 – Assignments – Solution VU

CS604 Assignment 2 Spring 2021 – Assignments – Solution VU

Solution:

Program1:

#include <stdio.h>

#include <sys/types.h>

#include <sys/stat.h>

#include <sys/errno.h>

#include <fcntl.h>

#include <unistd.h>




int main()



int fd;

char * fifo_one = "/tmp/fifo_one";

mkfifo(fifo_one, 0666);

char buffer[80];


fd = open(fifo_one, O_RDONLY);

read(fd, buffer, sizeof(buffer));


close(fd);


 

 

Program2:

#include <stdio.h>

#include <string.h>

#include <sys/types.h>

#include <sys/stat.h>

#include <sys/errno.h>

#include <fcntl.h>

#include <unistd.h>

#include <stdlib.h>



int main()



int fd1;

char * fifo_one = "/tmp/fifo_one";

mkfifo(fifo_one, 0666);

char buffer[80];


fd1 = open(fifo_one, O_WRONLY);

write(fd1, buffer, sizeof(buffer));

printf("YOUR NAME VUIDn");

close(fd1);



Students kindly share assignment files in relevant subject timely for discussion/solution.
or directly share with us ” Click here
QueryVU Telegram Groups subject wise Join Now
QueryVU WhatsApp groups subject wise Join Now

vulearning

#CS604 #Assignment #Spring #Assignments #Query

Leave a Reply

Your email address will not be published. Required fields are marked *