Ankita Saini has Published 194 Articles

Swift Program to remove the last given number of items from the array

Ankita Saini

Ankita Saini

Updated on 27-Jan-2023 12:38:26

In this article, we will learn how to write a swift program to remove the last given number of items from the array. An array is used to store elements of same data type in an order. So, here we use the following methods to remove the last given number ... Read More

Swift Program to remove the first given number of items from the array

Ankita Saini

Ankita Saini

Updated on 27-Jan-2023 12:34:59

In this article, we will learn how to write a swift program to remove the first given number of items from the array. An array is used to store elements of same data type in an order. So, here we use the following methods to remove the first given number ... Read More

Swift Program to Print object of a class

Ankita Saini

Ankita Saini

Updated on 27-Jan-2023 12:33:02

In this article, we will learn how to write a swift program to print object of a class. A class object is known as an instance of a class. For example, colour is a class then obj1, obj2, obj3 and obj4 are the objects from the class. A class ... Read More

Swift Program to get the last given number of items from the array

Ankita Saini

Ankita Saini

Updated on 27-Jan-2023 12:30:54

In this article, we will learn how to write a swift program to get the last given number of items from the array. An array is used to store elements of same data type in an order. So, here we are using the following methods to get the last ... Read More

Swift Program to get the first given number of items from the array

Ankita Saini

Ankita Saini

Updated on 27-Jan-2023 12:29:23

In this article, we will learn how to write a swift program to get the first given number of items from the array. An array stores elements of the same data type in order. Therefore, here we use the following methods to get the first given number of items from ... Read More

Swift Program to fill an array with a specific element

Ankita Saini

Ankita Saini

Updated on 27-Jan-2023 12:28:31

In this article, we will learn how to write a swift program to fill an array with a specific element. An array is used to store elements of same data type in an order whereas a set is used to store distinct elements of same data type without any definite ... Read More

Swift Program to find the prime numbers from the array

Ankita Saini

Ankita Saini

Updated on 17-Jan-2023 17:40:27

In this article, we will learn how to write a swift program to find the prime numbers from the array. Prime numbers are those numbers that are only divisible by 1 and itself. Or we can say prime number have only two factors that are 1 and the number itself. ... Read More

Swift Program to remove all 'nil' elements from the array

Ankita Saini

Ankita Saini

Updated on 17-Jan-2023 17:36:39

In this article, we will learn how to write a swift program to remove all ‘nil’ elements from the array. Till now we all know that an array can store elements of a single data type. But Swift array can also hold elements of multiple data types. To store ... Read More

Swift Program to find the EVEN numbers from the array

Ankita Saini

Ankita Saini

Updated on 17-Jan-2023 17:20:51

In this article, we will learn how to write a swift program to find even numbers from the array. Even number are those number which are completely divisible by 2. For example, 2, 6, 50, 20, etc. Here we use the following methods to find the even numbers from ... Read More

Swift Program to fetch elements from an array based on an index

Ankita Saini

Ankita Saini

Updated on 17-Jan-2023 17:15:02

In this article, we will learn how to write a swift program to fetch elements from an array based on an index. Using array syntax An array is used to store elements of same data type in an order whereas a set is used to store distinct elements of same ... Read More

1 2 3 4 5 6 7 ... 20 Next
Advertisements