Examlex

Solved

What Is Wrong with the Following Code Fragment

question 34

Multiple Choice

What is wrong with the following code fragment?
Int *p1, *p2;
P1 = new int;
P2 = new int;
*p1=11;
*p2=0;
P2=p1;
Cout << *p1 <<" " << *p2 << endl;
Delete p1;
Delete p2;


Definitions:

Realty

Property consisting of land and the buildings on it, along with its natural resources such as crops, minerals, or water; also known as real estate.

Water Rights

Rights concerning the ownership and regulation of the usage of water from rivers, lakes, or underground sources.

Mineral Rights

The ownership rights of underground resources like oil, natural gas, metals, and minerals.

Airspace

The space above the ground in which aircraft can fly, also subject to property, safety, and national defense regulations.

Related Questions