← Back to Question List
C++ Quiz #118
decltype and Integer Division
decltype gives each variable the type of the expression inside the brackets. What is printed?
📄 Code
1#include <iostream>23int main() {4 decltype(5 / 2) a = 5 / 2;5 decltype(5 / 2.0) b = 5 / 2.0;6 std::cout << a << " " << b << "\n";7 return 0;8}