Question: C++ PROGRAMMING Given the declaration: int num1, num2; int *ptr1; int *ptr2; double *ptr3; Mark the following the statements as Valid or Invalid. If it
C++ PROGRAMMING
Given the declaration:
int num1, num2;
int *ptr1;
int *ptr2;
double *ptr3;
Mark the following the statements as Valid or Invalid. If it is invalid, explain why
a. ptr1 = &num1;
b. ptr1 = ptr2;
c. ptr3 = ptr2;
d. num1 = ptr1;
e. ptr1 = &ptr2;
f. num1 = *ptr3;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
