C++ Quiz
How well do you know C++? This output-based and multiple-choice quiz will test your knowledge of this programming language.
3 min
Per question
Average time
Contest Score
Community Rating
Giant Elk judge
This test may have a higher chance of receiving a reward. Nominated for:

1. Educational explanations. 👍 Explanations cover why the correct answers are correct and why the wrong answers are wrong (when appropriate). E.g.: #q30, #q1, #q29

2. Well-used and self-made media. 👍 E.g.: #q1, #q12, #q15
Shadow ✪
It is one of the most well organized and explained quizz that I have seen, keep it up.
Savvy Skunk
This is one of the best-designed quizzes I have taken. Good job!
Calm Wolf author
Ace Cock
#9 "The & operator can be applied to"

Well technically & is also a bitwise and operator, which can be applied to rvalues.
Calm Wolf author
Oh, I have just noticed that the question is a bit ambiguous. Thanks for feedback, you're right!
Small Lizard
Select the correct object type: ______ file("Telegram", ios::in || ios::out);
1) Second operand of fstream constructor must be ios::in | ios::out, not ios::in || ios::out (one vertical bar, not two)
2) All types: fstream, ifstream, and ofstream can be answers: https://ideone.com/YmoH7h
Calm Wolf author
So, technically you can use, but in action, it won't take an effect. If you use ofstream file("Telegram", ios::in || ios::out); and try in the next line to write something in this file, like, file << "Something"; std::string forFile = "Sample"; file >> forFile; The last expression won't compile, since our file is inly for writing mode, not for reading. https://ideone.com/WcAeAm. I should have added some clarifications to questions, thanks for feedback.
Ulug'bek Isakov
cool quiz
Take the quiz to leave a comment