Advertisement
diegoaguilar

progc

Mar 2nd, 2012
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.42 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. #include <fcntl.h>
  5. #include <sys/types.h>
  6. #include <sys/stat.h>
  7. #include <unistd.h>
  8. #include <string.h>
  9.  
  10. int main(){
  11.     int fd2;
  12.     int x,i;
  13.     fd2=open("numeros",O_RDONLY);
  14.     printf("los numeros pares son de la fifo son\n");
  15.    
  16.             for(i=0;i<100;i++){
  17.                 read(fd2,&x,sizeof(x));
  18.                
  19.                 printf("%d\n",x);
  20.            
  21.             }
  22.        
  23.            
  24.            
  25.            
  26.        
  27.    
  28.     return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement