Q:

matrix multiplication using a single pipe

I want to write a c code such that the child sends two matrix to the parent using pipes, the parent will then do the matrix multiplication and send the resulting matrix back to the child.
I know how to write this program using two pipes, but i want to know how to write this program using a single pipe.
Can anyone please provide the c code for the same?

A:

Pipes are not bi-directional.
Try sockets. Or use two pipes.

