L Linh Chi New member Sep 18, 2021 #1 What will be the output of the following C++ code? Code: #include <iostream> using namespace std; int main ( ) { static double i; i = 20; cout << sizeof(i); return 0; } A. 4 B. 2 C. 8 D. garbage
What will be the output of the following C++ code? Code: #include <iostream> using namespace std; int main ( ) { static double i; i = 20; cout << sizeof(i); return 0; } A. 4 B. 2 C. 8 D. garbage
Nguyễn Cap Tuyến New member Sep 18, 2021 #2 Answer: c Explanation: The size of the double data type is 8. Code: $ g++ size1.cpp $ a.out 8 Upvote 0 Downvote