C was the C++ predecessor and alot of C remains in C++. I tested this sourcecodes in C/C++ compiler during college and it work. I don't know what version of compiler was I used. You can go ahead and test it. Also, here a link the difference between C and C++: http://www.cprogramming.com/tutorial/c-vs-c++.html