C++ examples for Language Basics:Console
Ring the bell on your computer by assigning the \a escape sequence to a variable, then printing that variable.
#include <iostream> using namespace std; int main()// w ww .j a v a2 s . co m { char bell = '\a'; cout << bell; // No newline needed here. return 0; }