C program to make a beep sound

Generate beep sound in C language: Here, we are going to learn how to make a beep sound in C programming language?
Submitted by Nidhi, on July 21, 2021

Problem Solution:

The "\a" escape sequence is used to make a beep sound i.e., it is used to generate a tone sound on the speaker. The beep sound can be used for the debugging or any other purpose.


The source code to make a beep sound is given below. The given program is compiled and executed using GCC compile on UBUNTU 18.04 OS successfully.

// C program to make beep sound

#include <stdio.h>

int main(int argc, char* argv[])
    printf("Beep sound started\n");
    printf("Beep sound stopped\n");

    return 0;


Beep sound started
Beep sound stopped


In the main() function, we used "\a" escape sequence to make a beep sound.

C Basic Programs »

Related Programs


Comments and Discussions!

Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© https://www.includehelp.com some rights reserved.