Each of the following definitions and program segments has errors. Locate as many as you can.
A. int x, *ptr = nullptr; &x = ptr;
B. int x, *ptr = nullptr; *ptr = &x;
C. int x, *ptr = nullptr; ptr = &x;
ptr = 100; // Store 100 in x
cout
D. int numbers[] = {10, 20, 30, 40, 50}; cout
cout
E. int values[20], *iptr = nullptr; iptr = values;
iptr *= 2;
F. float level; int fptr = &level;
G. int *iptr = &ivalue; int ivalue;
H. void doubleVal(int val) {
*val *= 2;
}
I. int *pint = nullptr; new pint;
J. int *pint = nullptr; pint = new int;
if (pint == nullptr)
*pint = 100;
else
cout