T Tam ca New member Sep 18, 2021 #1 What will be the output of the following C++ code? Code: #include <iostream> using namespace std; int main() { int arr[] = {4, 5, 6, 7}; int *p = (arr + 1); cout << arr; return 0; } A. 4 B. 5 C. address of arr D. 7
What will be the output of the following C++ code? Code: #include <iostream> using namespace std; int main() { int arr[] = {4, 5, 6, 7}; int *p = (arr + 1); cout << arr; return 0; } A. 4 B. 5 C. address of arr D. 7
T Thành Đạt New member Sep 18, 2021 #2 Answer: c Explanation: As we counted to print only arr, it will print the address of the array. Output: Code: $ g++ point2.cpp $ a.out 0xbfb1cff Upvote 0 Downvote
Answer: c Explanation: As we counted to print only arr, it will print the address of the array. Output: Code: $ g++ point2.cpp $ a.out 0xbfb1cff