fork download
  1. #include <stdio.h>
  2. #include <unistd.h>
  3.  
  4. int main() {
  5. printf("\a"); // This may not work on all systems
  6. // Use the beep function instead
  7. printf("\x07"); // This is the ASCII code for the bell character
  8. // Or use the system function to call the beep command
  9. system("aplay /usr/share/sounds/alsa/Front_Center.wav"); // This is for Linux systems
  10. return 0;
  11. }
Success #stdin #stdout 0.02s 25864KB
stdin
Standard input is empty
stdout
#include <stdio.h>
#include <unistd.h>

int main() {
    printf("\a"); // This may not work on all systems
    // Use the beep function instead
    printf("\x07"); // This is the ASCII code for the bell character
    // Or use the system function to call the beep command
    system("aplay /usr/share/sounds/alsa/Front_Center.wav"); // This is for Linux systems
    return 0;
}