What is the output of the following code snippet? Type “erro…
What is the output of the following code snippet? Type “error” if error. #include #include int main() { std::queue q; q.push(1); while(q.size() != 25) { q.push(q.front() + 1); } int count_1 = 0, count_2 = 0, count_3 = 0; while (!q.empty()) { if(q.front() == 1) count_1++; if(q.front() == 2) count_2++; if(q.front() == 3) break; q.pop(); } std::cout
Read Details