C++ Interview Questions

Bjarne-stroustrup
 
Prev6 of 17Next

According to the C++11 standard, what is the output of this program?

#include <iostream>

int main() {
	for (int i = 0; i < 3; i++)
	std::cout << i;
	for (int i = 0; i < 3; ++i)
	std::cout << i;
}

Answer