所以我正在尝试完成我的编程任务,这里是:
Write a C/C++ program (call it string invert) that takes a
string argument from the command line and outputs the string in reversed order. Here comes
the twist: Each process can output at most one character. If you want to output more than a
single character, you must fork off one or more processes in order to do that, and each of the
forked processes in turn outputs a single character. After the call to program string invert
with the command line argument, the output should appear, and no more processes should
be running, in addition to the shell. Test your program on any UNIX/LINUX machine, and
turn in the source code as part of the written assignment. (The source code should be at
most a few lines long.)
我可以轻松地读取和反转字符串,没问题。问题是当它说“每个进程最多可以输出一个字符”时是什么意思。我什至不明白那是什么意思。我不需要任何代码,我相信一旦我理解我就可以自己做。我只需要有人解释这应该是什么意思。