Multiple choice technology programming languages

1)void main() { int const *p = 5; printf(“%d”,++(*p)); }

  1. 6

  2. junk value

  3. some address

  4. error

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The code declares 'p' as a pointer to a const int (int const *p), meaning the value pointed to cannot be modified. The line printf("%d",++(*p)) attempts to increment the value through the pointer, which violates the const qualifier. This results in a compilation error. Option D is correct.