Please help with the following C++ question:
![Question & Answer: ing last: string courseGrade: int testScore [5]: int programmingScore }: Stud..... 1 Consider the following declarations: struct Student string first: string last; string courseGrade int testScore [51: int programmingScore Student *p = new student ; The following statement sets the first element of array testScore of the structure pointed to by p to 100](https://media.cheggcdn.com/media%2Fcb5%2Fcb560509-44bd-4b22-9e7b-98f283994a68%2Fimage)
Show transcribed image textConsider the following declarations: struct Student { string first: string last: string courseGrade: int testScore [5]: int programmingScore }: Student *p = new student: The following statement sets the first element of array testScore of the structure pointed to by p to _____ 100 _____.
Expert Answer
Hi,
Don't use plagiarized sources. Get Your Custom Essay on
Question & Answer: ing last: string courseGrade: int testScore [5]: int programmingScore }: Stud…..
GET AN ESSAY WRITTEN FOR YOU FROM AS LOW AS $13/PAGE
By default the member inside a struct are initialized to 0, therefore elements of testScore are 0, but if you want to set the first element to 100 you can use p->testScore[0]=100.