C++

Select all that apply. Select as many of the following options that make this sentence TRUE:
The contents of pointer variables may be changed with mathematical statements that perform

1. modulus
2. addition
3. subtraction
4. division
5. multiplication

Answer :

usmanqadeer

Answer:

2 & 3

Explanation:

Only mathematical operations that can be used to change contents of pointer variables include addition, subtraction, comparison, increments and decrements.

Although modulus, division and multiplications are not possible. A snippet of code is attached showing pointers addition and subtraction and their result.

Check it by replacing + or - signs with *, / or % which represent multiplication, division and modulus respectively. It would result in an error.

${teks-lihat-gambar} usmanqadeer
${teks-lihat-gambar} usmanqadeer

Other Questions