Suppose I have three C modules:
- The first one's function is to generate random output from
/dev/urandomand it can work fine independently without other two modules. - The second one's function is to take some forms of input and output some kinds of useful information and it can work fine alone, too.
- The last one's function is to manage the former two modules, and connect them, control them through
stdoutandstdin. Modules need to communicate through streams under the control of the third module. Is that a possible scenario? I found that many examples on the Internet just define a function outside a C source file and call it in the main function. That's too weak a relationship. I just wonder if my above scenario is possible. If possible, what kinds of knowledge does it need?