What is the output of the following code fragment?

int v1=2, v2=-1, *p1, *p2;
p1 = & v1;
p2= & v2;
p2=p1;
cout << *p2 << endl;
a. 2
b. -1
c. -2
d. 1


a. 2

Computer Science & Information Technology

You might also like to view...

When performing ripple, roll, slip, and slide trims, which will affect the length of your program?

What will be an ideal response?

Computer Science & Information Technology

To delete a table column, select the column and then click the ____________________ button on the Tables toolbar.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

An IP-based protocol used to communicate between iSNS clients and servers for the purpose of allowing iSCSI devices to discover and monitor one another

What will be an ideal response?

Computer Science & Information Technology

If you want to select the first and third rows in the table in the accompanying figure, you select the first row, and then hold down the ____ key while selecting the third row.

A. CTRL B. ALT C. SHIFT D. ENTER

Computer Science & Information Technology