What is the Role of '/a' in printf ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is the Role of '/a' in printf ?

I have read somewhere that /a produces Windows sound but when i tried it it doesn't work, Can anyone please explain.

1st Sep 2020, 4:41 AM
iudaymehta2001
iudaymehta2001 - avatar
1 Answer
+ 3
Get the slash direction correct. That would explain your problem. Try this: #include <stdio.h> int main() { printf("\a"); return 0; } Notice the \ and not /. The code I gave worked properly for me when I compiled and ran using CodeBlocks in Windows 10. Also be sure that your speakers or head phones have good volume and are working properly.
1st Sep 2020, 5:04 AM
Josh Greig
Josh Greig - avatar