I googled for "linux c system bell" and found several relevant hits. I am attaching the link to the first hit which has some C code. You might want to make sure that in volume settings, system bell is not muted.
http://www.gidforums.com/t-19169.html seems to be easier. -- Mailing list guidelines and other related articles: http://lug-iitd.org/Footer
