Skip to main content
🔮 Output PredictionC+ C++ Hard⚡+35 XP

Pointer Arithmetic

What is printed?

C++
int arr[] = {10, 20, 30, 40};
int* ptr = arr;
ptr += 2;
cout << *ptr;

🔮 What is the output?