Analyze the following Apple Swift code and select its correct output from the given options.
struct a1 [
var x = 0.0, y = 0.0
}
struct b1 {
var w = 0.0. h = 0.0
}
struct Rt{
var n1 = a1()
var 51 = b1()
var c1: a1 {
getl
let cX = n1.x + (sI.w / 2)
let CY = n1.y -|- (s1.h / 2)
return a1(x: cX. y: cY)
}
set(cc) [
n1.x = cc.x - (s1.w ‘36 4)+2.5
n1.y = my - (sl.h % 4)+2.5
I I I
var rr = Rt(n1: a1(x: 0.0, y: 0.0),
$1: b1(w: 10.0, h: 10.0))
let isc = rr.c1
rr.c1 = a1(x: 16.0, y: 16.0)
print("\(rr.n1.x), \(rr.n1.y)")
Correct Answer:
16.5.16.5
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More Swift MCQ Questions