Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyC++const correctnessSingle-choice MCQ

Which statement is illegal?

int a = 1, b = 2; const int* p1 = &a; // (1) int* const p2 = &a; // (2) p1 = &b; // (3) *p2 = 9; // (4)