How to produce beep sound using “\a” escape character?

前端 未结 6 1756
滥情空心
滥情空心 2021-01-04 06:00

If I write the following program, then there is no beep sound on running the code.

#include 
int main()
{ 
    printf(\"\\a\");
    return 0;
         


        
6条回答
  •  难免孤独
    2021-01-04 06:52

    #include
    #include
    
    int main()
    {   
        Beep(1000, 1000); /* you can use any number starting from 250, but make sure you use                           it both times
    
    
        return 0;
    
    }
    

提交回复
热议问题