what is deference between ftruncate() and ltrunc()???

what is deference between ftruncate() and ltrunc()???
how can i get use of share memory???

ltrunc() is an old QNX function, whereas ftruncate is portable, use ftruncate().

For shared memory, look at the reference for shm_open()