i didt getting output in this nameppipe program. please anyone let me know error
Code:
#include<stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
int main()
{
int i,j;
char s[]="namedpipe",b[20];
i=mkfifo("namedpipe",0666);
j=open("namedpipe",O_RDWR);
write(j,s,4);
read(j,b,4);
printf("%s\n",b);
return 0;
}