e.com
Tools Add-ons Help
All changes saved in Drive
Text
Arial
11
A
+
Some pointer arithmetic is allowed. Which of the following arithmetic operators are
pointer + integer, pointer-pointer, pointer-integer, integer+pointer, integer*pointer?
I
Given the definitions:
int *p1, *p2;
p1 = new int;
p2 = new int;
What is the difference between the following two assignments:
a) p1 = p2;
b) *p1 = *p2?
3. Given the declarations below, write a code fragment that allocates a nameless variable for pointer p1 to point to int *p2.