Search:

Type: Posts; User: alcaseltz

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    5,054

    What do you mean sort needs a parameter? ...

    What do you mean sort needs a parameter?
    ls|sort works without a parameter for sort, no parameter means read from stdin, no? This is the case here, just instead of an ls output, there is another...
  2. Replies
    2
    Views
    5,054

    multiple forks, pipes?

    What this code does is, parent process forks a child and then child forks a child. Parent writes a string to the pipe, child reads it and then writes it to the next pipe, the one connecting child and...
  3. Replies
    1
    Views
    4,654

    printf to pipe

    I am trying to figure out how pipes work so I have this code:


    int main(){
    int fdpipe[2];
    pipe(fdpipe);
    if(fork()!=0){//parent
    dup2(fdpipe[1],1);
    ...
  4. though no external prototype, no header included, function "seen"

    So firstly I want to ask why this:

    add.c :


    int add(int a,int b){
    return a+b;
    }
  5. pass a 2d array to function which takes an array of pointers as argument?

    So what I want to do is something like that:



    void function(char *ar[]){
    strcpy(ar[0],"blablabla");
    }
    int main(){
    char str[100][200];
    function(str); //wrong
Results 1 to 5 of 5