Question: undefined QUESTION 6 Consider the following code: struct pair { int x, Y; }; We want to declare z to be a pair, and to

undefined QUESTION 6 Consider the following code: struct pair { int x,undefined

QUESTION 6 Consider the following code: struct pair { int x, Y; }; We want to declare z to be a pair, and to set z's x value to 1 and y value to 2. Which of the following code fragments will correctly do this? Check all that apply pair z(x = 1, y = 2); struct pair z; Z->x= 1; z->y = 2; struct pair z = {1, 2}; struct pair z; Z.X = 1; Z.y = 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!