Now, I have two programs A and B. Program A uses `system()` to execute program B.

But, the program B uses writing file way to return its execute result.

Has program A a better way to get the return value of program B?

For example

In program A

```
int main(){
    system("B.exe");
    readFile(finePath);
    //do something
    return 0;
}

```

In program B

```
int main(){
    char temp[1024];
    //do something
    writeFile(temp);
    return 0;
}

```