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

asked
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.
answered
User Tim Ramsey
by
8.2k points
Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.