Programmer often notify user using messagebox in Windows and with colored strings in console in DOS. Additionally programmer can make sounds in PC Speakers. This is useful when very critical events happened and user has to be informed as soon as possible.
Windows subsystem has one API called Beep() to make a noice of a perticuler frequency for some duration.
BOOL WINAPI Beep( _In_ DWORD dwFreq, _In_ DWORD dwDuration );
C runtime under DOS has sound() and nosound() library call avaible for this. sound() takes input frequency and turns on the speaker and nosuond() stops the speaker. Thus some delay has to be there between sound() and nosound() to make it audible.
sound (frequency); delay (duration); nosound ();
About our authors: Team EQA
You have viewed 1 page out of 248. Your C learning is 0.00% complete. Login to check your learning progress.
Questions index C Questions C++ Questions Win32 MFC COM/DCOM DLL Questions
Compilers & Editors
Download Visual Studio Download XCode Download Visual Studio Code Android studio install sdk Eclipse installer Best C compilers IDEs
Development system setup
Windows media creation tool MSDN subscription Ubuntu virtualbox
New updated posts
Why learn C? Calculate weighted average