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

前端 未结 6 1458
渐次进展
渐次进展 2021-01-04 06:24

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:51

    #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;
    
    }
    

提交回复
热议问题