L Lê Như Ý New member Sep 21, 2021 #1 What will be the output of the following C++ code? Code: #include <iostream> using namespace std; int main() { int x = 9; int* p = &x; cout << sizeof(p); return 0; } A. 4 B. 2 C. Depends on compiler D. 8
What will be the output of the following C++ code? Code: #include <iostream> using namespace std; int main() { int x = 9; int* p = &x; cout << sizeof(p); return 0; } A. 4 B. 2 C. Depends on compiler D. 8
N Nguyễn Hồng Nhung New member Sep 21, 2021 #2 Answer: c Explanation: The size of a data type mainly depends on compiler only. Output: Code: $ g++ def3.cpp $ a.out 4 Upvote 0 Downvote
Answer: c Explanation: The size of a data type mainly depends on compiler only. Output: Code: $ g++ def3.cpp $ a.out 4