hello i have got little problem :)
create a c program which starts with 3 processes the first proccess generates 50 random numbers and writes them inti common memory. the second proccess reads them and whrites the even numbers in file A,the odd numbers in file B.

#include <stdlib.h>
#include <stdio.h>

int main(void)
    int A;
    for (A = 0; A < 50; ++A) {
       int number;

       number = rand();

  return 0;

i create first part of the program i also know how to find odd and even numbers

if ( x % 2 == 0 ) { //even
} else { /odd

i know that i must insert "fd = open("blabla",O_RDWR|O_CREAT,0)" after "if" but my knowlodge isnt enogh :(

thanks for answer and tutarial page i read all of them fopen seems better then open.At the code which i wrote it finds 50random numbers but i dont know how to find old or even numbers and write them to 2 different file.