C++ char type Ring the bell on your computer by assigning the \a escape sequence to a variable
#include <iostream>
using namespace std;
int main()/*from w w w. j a va2s . co m*/
{
char bell = '\a';
cout << bell; // No newline needed here.
return 0;
}