← Back to Question List
C++ Code Walkthrough #25
Double to Int Truncation
📄 Code
Read carefully — what does this print?1#include <iostream>2using namespace std;3int main() {4 double d = 7.9;5 int i = (int)d;6 cout << i << endl;7 return 0;8}