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?

Priygop - Leading Professional Development Platform | Expert Courses & Interview Prep