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

Pointer of Struct BASIC C++ PROGRAM PLEASE WRITE IN BASIC C++ AND NOTHING TOO AD

ID: 3694079 • Letter: P

Question

Pointer of Struct

BASIC C++ PROGRAM PLEASE WRITE IN BASIC C++ AND NOTHING TOO ADVANCED

For the following questions, assume that type T is a struct in which two of the members are of type int and are named m and n, that x is of type T, and that p is a pointer to an object of type T.

1. Write two different expressions that can be used to access the data member m of a struct pointed to by p

2. Write a statement that can be used to input values into the data members m and n of the data members of the object pointed to by p

3. Write a statement that can be used to output the values of the data members m and n of the data members of the object pointed to by p

Explanation / Answer

x.m and p->m cin>>p->m>>p->n; cout