CJCoding With Joseph
← Back to Question List
C++ Code Walkthrough #38

Pointer Dereference and Modify

mediumPointers

📄 Code

Read carefully — what does this print?
1#include <iostream>
2using namespace std;
3int main() {
4 int a = 10;
5 int* p = &a;
6 *p = *p + 5;
7 cout << a << " " << *p << endl;
8 return 0;
9}

🎯 Your Answer