
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 516 Articles for Swift

1K+ Views
This tutorial will discuss how to write swift program to get the magnitude of the number. An array is an ordered collection which is used to store same type of data. For example, if any array is of integer type then it will only store integers, you are strictly not allowed to store elements of other data types like string, float, etc. To remove all the elements from the specified array Swift provide an in-built library function named removeAll(). The removeAll() function will delete all the items from the specified array. Or it can delete elements that match the given ... Read More

2K+ Views
This tutorial will discuss how to write swift program to remove an element from the set. Set is a primary collection type in Swift. It is an unordered collection which stores unique values of same data type. You are not allowed to store different type of values in the same set. A set can be mutable or immutable. To remove an element from the set Swift provide an in-built library function named remove(). The remove() function delete the given element from the specified set. If the given element is not the part of the specified set, then it will return ... Read More

173 Views
This tutorial will discuss how to write swift program to add a new element in the set. Set is a primary collection type in Swift. It is an unordered collection which stores unique values of same data type. You are not allowed to store different type of values in the same set. A set can be mutable or immutable. To add a new element in the set Swift provide the following functions − insert() update() Below is a demonstration of the same − Input Suppose our given input is − MySet = [23, 45, 1, 46, 2] Insert ... Read More

2K+ Views
This tutorial will discuss how to write swift program to convert a string to uppercase. A string is a sequence of characters for example, “RedCar”. Or we can say, string are used to represent textual data. Swift support a String data type which is used to create a String type variable, or we can say to represent strings. To convert the given string into uppercase Swift provide a in-built function named uppercased(). The uppercased() function is used to convert all the characters(either in lowercase or in uppercase or in both) of the given string into uppercase. This function does not ... Read More

2K+ Views
This tutorial will discuss how to write swift program to convert a string to lowercase. A string is a sequence of characters for example, “RedCar”. Or we can say, string are used to represent textual data. Swift support a String data type which is used to create a String type variable, or we can say to represent strings. To convert the given string into lowercase Swift provide a in-built function named lowercased(). The lowercased() function is used to convert all the characters(either in lowercase or in uppercase or in both) of the given string into lowercase. This function does not ... Read More

1K+ Views
This tutorial will discuss how to write swift program to get a random element from the Set. Set is a primary collection type in Swift. It is an unordered collection which stores unique values of same data type. You are not allowed to store different type of values in the same set. A set can be mutable or immutable. Syntax Following is the syntax for Set − var name : Set = [element1, element2, element3] To get a random element from the Set Swift provide an in-built function named randomElement(). This function return a random element from the given ... Read More

516 Views
This tutorial will discuss how to write swift program to get the size of set. Set is a primary collection type in Swift. It is an unordered collection which stores unique values of same data type. You are not allowed to store different type of values in the same set. A set can be mutable or immutable. To get the size of a Set Swift provide an in-built property named count. It will return the total number of elements present in the specified count. Below is a demonstration of the same − Input Suppose our given input is − MySet ... Read More

982 Views
This tutorial will discuss how to write swift program to find minimum set element using library function. Set is a primary collection type in Swift. It is an unordered collection which stores unique values of same data type. You are not allowed to store different type of values in the same set. A set can be mutable or immutable. To find the smallest set element Swift provide an in-built function named min(). This function return minimum element from the given set. It will return nil if the given set is empty. Here the returned object of type Optional . So ... Read More

188 Views
This tutorial will discuss how to write a Swift program to find the hyperbolic arctangent of given radian value − atanh(a) = 1/2 * ln(1+a/1-a) In Swift, we can calculate the hyperbolic arctangent of the given radian value using the in-built atanh() function. This function returns the hyperbolic arctangent value of the specified number. Here, the specified number represents an angle. Syntax Following is the syntax − atanh(Num) Here, the value of Num can be of integer, float, or double type. The value of Num should be in between -1 to 1 range. If the value of Num is ... Read More

243 Views
This tutorial will discuss how to write a Swift program to find the tangent of given radian value. A tangent function is used to define the ratio of the length of the opposite side to the adjacent side in the right-angled triangle. It is also known as the tan function. The mathematical representation of the tangent() function is − tan() = opposite side/adjacent Side In Swift, we can calculate the tangent of the given radian value using the pre-defined tan() function. This function returns the tangent value of the specified number. Here, the specified number represent an angle. Syntax ... Read More