Quiz

Solve a quiz to see where you stand!

1

What is the value of *ptr1 at the end of this code?

int main(){
  int * ptr1 ; 
  double *ptr2;
  ptr1 = new int;
  ptr2 = new double;
  *ptr1 = 70;
  *ptr2 = 59.5;
  ptr1 = ptr2;
}
A)

70

B)

59.5

C)

59

D)

Error

Question 1 of 40 attempted

Get hands-on with 1200+ tech skills courses.