In ANSIC use semaphores and mutex?
How to exchange messages between the programs?

What compiler? What operating system? Use of semiphores and mutex is operating system dependent. But neither of those will help you with interprocess communications. If you are opn *nix one way to do it is via shared memory. MS-Windows has something similar called the clipboard. Another way to exchange information is via the file system, or you could use sockets or pipes.

What compiler? What operating system?

linux and gcc

linux and gcc

As A.D. said you'll have to provide more info. These programs, are they on the same machine or distributed over a network? Will you be using pipes, shared memory, sockets or even possibility threads?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.