2 ms·
By this logic the function below would be UB. It isn't. void f() { int d; bool divide; std::cin >> d >> divide; std::cout << (divide ? 1/d
by protomolecule 2y ago
By this logic the function below would be UB. It isn't.
void f()
{
int d;
bool divide;
std::cin >> d >> divide;
std::cout << (divide ? 1/d : d);
}