If I write the following program, then there is no beep sound on running the code.
#include int main() { printf(\"\\a\"); return 0;
I agree with @Steve Jessop. People will go to great lengths to keep their computers quiet.
In Windows: As an alternative to "\a", you could use WinAPI's Beep command. If you are using Windows 7, this may not work as expected.
Beep Function (Windows)