cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
What does this program?
What does this program?
Oct 11, 2015 at 2:47pm UTC
Thebeatboxer
(4)
Hi! I saw a picture with a program and i am wondering what it does. I tested and it freezes the .exe. Can you tell me why?
1
2
3
4
5
6
7
8
#include <iostream>
using
namespace
std;
int
main; {
for
(; ; ) cout<<
'\a'
;
return
0; }
Oct 11, 2015 at 2:47pm UTC
LB
(13399)
Aside from the typos making this an invalid program, it creates an infinite loop that outputs the
'\a'
character infinitely.
Recall that in a for loop, all three parts are optional.
Last edited on
Oct 11, 2015 at 2:48pm UTC
Oct 11, 2015 at 2:52pm UTC
Thebeatboxer
(4)
Thanks for you very very fast response! :D
Topic archived. No new replies allowed.