Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

This program sounds the bell!

Tags:

c

I'm a brand-new student in programming arena so I can't grasp this program written in my book that I have been following for a few days. The program is like this:

#include "stdio.h"  main() {  printf("\a"); } 

What does this program mean? Does this program mean that we could hear a ringing bell? I can't hear any ringing bell sound!!!

like image 384
Sharifhs Avatar asked Aug 11 '10 07:08

Sharifhs


People also ask

What is the sounds of bell?

tintinnabulation Add to list Share. The noun tintinnabulation refers to a bell-like sound, like the tintinnabulation of wind chimes blowing in the breeze. The sound of bells ringing, like church bells on a Sunday morning, can be called tintinnabulation.

Why is my computer making a bell sound?

More often than not, the chime sound plays when a peripheral device is connected or disconnected from your computer. A malfunctioning or incompatible keyboard or mouse, for example, or any device that turns itself on and off, can cause your computer to play the chime sound.

What is bell in C?

ASCII character 7 is the BELL character, and it's represented in C as \a . Some terminals will produce a beep when this character is output on the terminal; nowadays, many don't.

What is \A in C programming?

\a (alert) Produces an audible or visible alert without changing the active position. I´ve never seen this used in any C code to indicate an error. By the way, I didn´t know that an escape sequence can/could trigger an audible signal on some systems.


1 Answers

ASCII character 7 is the BELL character, and it's represented in C as \a. Some terminals will produce a beep when this character is output on the terminal; nowadays, many don't. (I'm looking at you, Ubuntu.)

like image 146
Thomas Avatar answered Sep 25 '22 17:09

Thomas