output string message to pipe

i am new to linux programming. can anyone answer my question?

there is one pipe file "my_pipe"
prw-r--r-- 1 john rnd 32 Aug 17 19:45 my_pipe

how to output string message (char*) to this pipe? which API should I use?

If you have opened the pipe via pipe system cmd then you must have access to 2 file descriptors which are read and write ends for pipe. You can write on the write end of pipe using the 'write' system call.

A better help would be Beej's guide for IPC.

regards
Apoorva Kumar

thanks, will try it.

If you already have a fifo file you don't have to do special things to write/read to/from this file. From the point of view of the process it is the ordinary file with write/read capabilities. If you want IPC you can at first create a pipe "in the memory" and use 2 descriptors to read/write.