Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I already know the answers are a. 1 b. 10 c. 5, 5 d. (1, 0) e. (3, 3) Please help me understand the answers.

I already know the answers are

a. 1

b. 10

c. 5, 5

d. (1, 0)

e. (3, 3)

Please help me understand the answers. How do I get to them? Please show me how i can go through the loop or explain how I can reach each answer.

image text in transcribed

12. A struct for a labeled point in (r.y) space is defined as follows: typedef struct Pt struct > Pt; //a labeled point in (x,y) space int aSample (Pt arg1, int anArray [4], Pt pts [5]) int xcoor; //x-coordinate for the point int ycoor; /ly-coordinate for the point A function is defined as follows: int i; for (1-0 ; 1d;i++) { anArray[i] - 3-i; pts [i].xcoori; pts [i].ycoor-anArray [3-i]; argl.xcoor !; argl.ycoor# 3-1 ; return (i+6); The following lines are found at the top of main): Pt aPt; Pt arrayOfPts[5]; int numbers [41 0,0,0,0; aPt.xcoor5; aPt.ycoor-aPt.xcoor; int result -aSample (aPt, numbers, array0fPts); What is printed? printf("%d",numbers [2]); b. What is printed? printf("%d ",result); What is printed?: printf("(%d, %d) ",aPt.xcoor,aPt.ycoor); c. d. What is printed?: printf("(%d, %d) " , array0tPts [1].xcoor,array0tPts [1].ycoor); What is printed?: printf("(%d, %d) " , array0tPts [3].xcoor,array0tPts [3].ycoor); e

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Inference Control In Statistical Databases From Theory To Practice Lncs 2316

Authors: Josep Domingo-Ferrer

2002nd Edition

3540436146, 978-3540436140

More Books

Students also viewed these Databases questions