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, 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
Get step-by-step solutions from verified subject matter experts
