225k views
5 votes
The statement:

int *ptr;

has the same meaning as

A.
int ptr;

B.
*int ptr;

C.
int ptr*;

D.
int* ptr;

User Dhj
by
5.6k points

1 Answer

3 votes

Answer:

D. int* ptr;

Step-by-step explanation:

int *ptr; it is pointer used to hold address of another integer variable.In the options provided we have int ptr that is an integer variable of name ptr.

*int ptr; is wrong this will give error because first we have to write the data type.

int ptr*; is an integer varaible with name ptr*.

int* ptr; is a pointer which can hold the address of another integer varaible.

User Poonam
by
5.1k points