MCQs > IT & Programming > Swift > Output of code? func abc(p: Double...) -> Double { var sm: Double = O for number in p[ sm += number I return sm I Double{p.count) I print(abc(6, 7.25, 16.75))

Swift MCQs

What will be the output of the following code?

func abc(p: Double...) -> Double {

var sm: Double = O

for number in p[

sm += number

I

return sm I Double{p.count)

I

print(abc(6, 7.25, 16.75))


Answer

Correct Answer:

10.0

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Swift Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Swift Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it