MNY
MNY

Reputation: 1536

why i don't hear beep using '\a' in xcode?

As far as I understan, using \a in printf argument suppose to give a beep sound of alert:

I'm doing printf("\a"); but getting an upside down question mark...can someone please tell me why?

Upvotes: 2

Views: 1089

Answers (1)

Karthik T
Karthik T

Reputation: 31952

As far as I know, \a uses a hardware speaker that PCs use to beep during start up, etc. Maybe Macs don't have this?

From http://en.wikipedia.org/wiki/Bell_character:

Modern terminal emulators often integrate the warnings to the desktop environment (e.g., the Mac OS X Terminal will play the system warning sound) and also often offer a silent visual bell feature that flashes the terminal window briefly.

Can you try running the exe from terminal and seeing if anything happens?

Upvotes: 3

Related Questions