C program to generate a beep sound.
#include<stdio.h>
int main()
{
// Following printf will ring a beep sound.
printf("%c", 7);
/* Note: 7 is ASCII value of a beep sound.
Use a loop to ring a series of beep sound. */
return 0;
}
Output:
You will listen a beep sound.
Does this even work? I am using TURBO C.
ReplyDeleteAs 7 is ASCII value of Beep Sound, you will listen one beep sound for every one %c for ASCII 7. I have tried and its properly working on Windows 7, Dev C++ editor.
Delete