Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Given thedeclarations Float x; Float* ptr = &x; What does the following state

ID: 3608892 • Letter: 1

Question

1.       Given thedeclarations

Float x;

Float* ptr = &x;

What does the following statement do?

*ptr = 24.9;

A) it stores 24.9 into ptr.

B) it store s 24.9 into the variable pointed to by ptr.

C) it stores 24.9 into x.

D) b and c

E) a, b, and c

2.       Given thedeclarations

Float* ptr1;

Float* ptr2;

Which of the following is a valid assignment?

A)     Ptr1 = ptr2;

B)      *ptr1 = ptr2;

C)      *ptr1 = *ptr2;

D)     A and c

3.       In the expression&alpha, the ampersand (&) is known as the ___________operator.

Int alpha=35;

Int beta=50;

Int* ptr1=α

Int* ptr2=β

*ptr1=*ptr2;

Cout << *ptr1 << ‘ ‘ << *ptr2<< endl;

Cout << alpha << ‘ ‘ << beta<< endl;

Explanation / Answer

1. Given thedeclarations Float x; Float* ptr = &x; What does the following state