hi all;
i have run this code and the first read and write work correctly. but and the second one is missed.
the output log is:
freez@JALALI:~$ ./a
salam8a
okok2freez@JALALI:~$
#include <stdio.h>
int main()
{
write(1,"salam",5);
char a[2];
char b[5];
read(0,a,2);
if(a[0]=='8')
{write(1,"ok",2);
read(0,b,5);
write(1,"ok2",3);
}
return 0;
}