What is the output when following code is executed? import UIKit import AVFoundation var p: AVAudioPlayer? func func(filename:String) { let url = NSBundle.mainBundle().URLForResource(filename, withExtension: "caf")! do { p = try AVAudioPlayer(contentsOfURL: url) guard let p = p else { return } … … … p.prepareToPlay() p.play() } catch let error as NSError { print(error.description) } }
Correct Answer: Plays audio caf file in the resource folder of the bundle
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More Swift MCQ Questions