4.6k views
3 votes
Assume that strike Counter has already been declared to be a "pointer to int". Assume further that strike Counter has been initialized -- its value is the address of some int variable. Write a statement that adds 22 to the value of the variable that strikeCounter is pointing to.

1 Answer

4 votes

Answer:

The statement to this question can be defined as follows:

*strike_Counter =*strike_Counter +22;//adds value 22 in *strike_Counter

Step-by-step explanation:

In the given question, it is already defined, that "strike_Counter" is an integer pointer variable, which means, it only holds the integer value in its address memory.

In the next step, it is defined, that it adds the value "22" in its variable, and for this, we declare the statement in the answer section, which adds the value.

for example, if in the "strike_Counter" variable holds the integer value, that is 5 and after adding the 22 it will become 27.

User KnowHoper
by
3.6k points