Medium
const_cast on a reference to a const object
What happens when this program runs?
main.cpp
#include <iostream>
void modify(const int& r) {
int& mr = const_cast<int&>(r);
mr = 100;
}
int main() {
const int x = 42;
modify(x);
std::cout << x << std::endl;
}3 of 117 in C++