Есть такой код:
#include <fcntl.h>
#include <unistd.h>
int fd;
int main(int argc, char** argv)
{
fd=open(argv[1],O_RDONLY);
int a;
read(fd,&a,1);
while(a!=-1){
write(1,&a,1);
read(fd,&a,1);
}
close(fd);
return 0;
}
Есть такой код:
#include <fcntl.h>
#include <unistd.h>
int fd;
int main(int argc, char** argv)
{
fd=open(argv[1],O_RDONLY);
int a;
read(fd,&a,1);
while(a!=-1){
write(1,&a,1);
read(fd,&a,1);
}
close(fd);
return 0;
}
Ответ на: комментарий от mikki Ответ на: комментарий от Genuine Ответ на: комментарий от mikki Ответ на: комментарий от Dorif Ответ на: комментарий от Dorif Ответ на: комментарий от mikki Ответ на: комментарий от Boy_from_Jungle Ответ на: комментарий от Genuine Ответ на: комментарий от Genuine Ответ на: комментарий от Laz Ответ на: комментарий от anonymous Ответ на: комментарий от Genuine