38.4k views
3 votes
Assume that an int variable counter has already been declared. Assume further a variable counterPointer of type "pointer to int" has also already been declared. Write a statement that makes counterPointer "point" to counter.

User Psobko
by
6.4k points

1 Answer

4 votes

Answer:

Following are the statement:

counterPointer = &counter;

Step-by-step explanation:

The following statement is correct because in the question it is given that there is an integer data type variable i.e., "counter" and there is another integer data type pointer variable i.e., "counterPointer" and finally we write a statement in which the pointer variable points to the integer variable.

User Matheo
by
7.0k points