Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Im Using Swift Programming language and i needed some help with some questions Question 1 1 pts If a function provides a default value for
Im Using Swift Programming language and i needed some help with some questions
Question 1 1 pts If a function provides a default value for a parameter, the type does not need to be specified. O True False Question 2 1 pts Which of the following function signatures indicates a function with an integer return type in Swift? O func addValues(a: Int, b: Int) O func addValues(Int) O func addValues(a: String, b: String) -> Int O func addValues(a: Int, b: Int) : Int Question 3 1 pts In Swift all function parameters must provide a type for the value. O True O False Question 4 1 pts Which of the following is NOT a legal function declaration in Swift? func testFunc(a: String, b: String) -> String O func testFunc(a: String, b: String) -> Int O func testFunc(a: Int, b: Int) O func testFunc() func testFunc(a: Int, b: Int) -> Int O func testFunc(a, b) -> Int O func testFunc(a: String, b: String) Question 5 1 pts In Swift a function can be called without one of the expected parameters providing which of the following is true? The function specifies a default value for the parameter. The parameter name is declared as a nil value. The parameter name is declared with a question mark after it. O The function has no return value. Question 6 1 pts Concatenation in Swift is performed using which of the following operators? 00 O + O 07 Question 7 1 pts In Swift, function arguments can have label names that differ internally and externally. o True False Question 8 1 pts The "hasSuffix" method checks if a string ... O begins with the given text. has the matching text in a case insensitive form at the end of the string. has the matching text in a case insensitive form at the beginning of the string. has the given text anywhere within it. ends in the given text. Question 9 1 pts To escape a quote mark within a string what character must be used? single quote' back slash forward slash / double quote Question 10 1 pts To check if a string has no characters within it, you can use the property of the string? o Boolean empty is False O isEmpty false
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started