sound c

Sound function produces the sound of a specified frequency. Used for adding music to c program, try to use some random values in loop, vary delay and enjoy.

Declaration:- void sound(unsigned frequency);

C programming code for sound
#include<dos.h>

main()
{
   int a;

   for ( a = 200 ; a <= 1000 ; a = a + 20 )
   {
      sound(a);
      delay(25);
   }
   nosound();

   return 0;
}

Comments

Popular posts from this blog

Operators And Separators In C Language Operators in C Language:

Difference between asterisk and ampersand operators in c