123k views
5 votes
The statement: int *ptr = nullptr; has the same meaning as ________.

User Maf
by
7.8k points

1 Answer

3 votes
The choices for the above question are:

A) int ptr = nullptr;
B) *int ptr = nullptr;
C) int ptr* = nullptr;
D) int* ptr = nullptr;

The right answer is D. int* ptr = nullptr; In both cases ptr is a pointer to an integer. I hope this is the answer that you were looking for.
User Tim Ramsey
by
8.2k points