Question: 1 . Explain the difference between struct Person and struct Person person 2 . What will be the output of the printPerson function call in
Explain the difference between struct Person and struct Person person
What will be the output of the printPerson function call in main? Explain why.
DiscussthedifferencebetweenaccessingpersonnamedirectlyandviapersonPtrname How does modifying the structure via a pointer affect the actual instance? Give ex amples based on the code.struct Person char name;int age; ;void printPersonstruct Person p printfName: s Age: d
pname, page;int main struct Person person; strcpypersonname, "Alice"; personage ; struct Person personPtr &person; strcpypersonPtrname, "Bob"; personPtrage ; printPersonperson;return ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
