I am using XBee PRO module,and it has been interfaced connected to ubuntu system by RS232.The device is responding fine in both AT and API mode.

Now I wanted to program the device in API mode by using Xbee_ANSIC_Library.Can any one provide me sample example of using these library and build a small program.

There are a number of samples that can be built at https://github.com/digidotcom/xbee_ansic_library/tree/master/samples/posix.

You may need to tweak the Makefile for your environment.