
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 33676 Articles for Programming

5K+ Views
The purpose of an array is to store a similar type of data in a series of the memory places that can be accessed using base addresses and indexes. We use arrays to hold data for a variety of purposes in many different applications. Finding minimum and maximum elements are a fairly common example of arrays that are needed in several applications including sorting, etc. In this article, we will see how we can find the second-largest element from an array in C++. Understanding the concept with examples Given array A = [89, 12, 32, 74, 14, 69, 45, 12, ... Read More

2K+ Views
The magnitude of a given number means the difference between that particular number and zero. It can also mean the size of a mathematical object in terms of other objects of the same kind. We will follow the first definition here, and the magnitude or the absolute value of a number is represented as |x|, where x is a real number. We explore the ways to display the absolute value or magnitude of a given real number. Naïve method We can write a program ourselves that find out the magnitude of a given real number. The example is explained below. ... Read More

1K+ Views
Arrays are homogeneous data structures to hold a similar type of data in consecutive memory locations which can be addressed using base addresses and indices. There are plenty of different applications where we use arrays to hold data for suitable uses. Inserting elements into an array is one of the cumbersome processes. We can either insert them by taking inputs from users in a loop or insert them from a file or there are such other processes to insert them. To initialize an array with a specific value (insert that value at all positions of that array) has also a ... Read More

1K+ Views
A linear sequential data structure called an array is used to store homogeneous data in a series of memory regions. An array needs to have certain features in order to insert, delete, traverse, and update elements effectively, just like other data structures do. Our arrays in C++ are static. In addition, C++ offers a few dynamic array structures. There may be a maximum of Z elements that can be stored inside a static array. And there are currently n elements in it. In this article, we will see how to iterate over all elements present inside the array using C++. ... Read More

6K+ Views
An array is a linear sequential data structure to hold homogeneous data in consecutive memory locations. Like other data structures, an array also must−have features to insert, delete, traverse and update elements in some efficient way. In C++ our arrays are static. There are a few dynamic array structures also available in C++. For a static array, there may be a Z number of elements that can be stored inside that array. And till now we have n elements into it. In this article, we will see how to check whether an element is present inside an array or not ... Read More

10K+ Views
The storage of homogenous (same) data across several memory locations is made possible by the use of arrays and data structures. The key benefit of using arrays is that we can use the index argument to retrieve them from anywhere we want. This data structure becomes linear because data must be inserted and withdrawn progressively. All we need to do is place the index or position number for that element inside the square bracket to retrieve it from the array. In this article, we will take array A and another element e. We will insert e into A at the ... Read More

6K+ Views
The usage of arrays, and data structures, allows for the storage of homogeneous (same) data over several memory locations. The main advantage of using arrays is that we can access them from anywhere we want by using the index argument. The fact that data must be added and removed sequentially transforms this data structure into a linear one. To retrieve an element from an array, all we need to do is use the index or position number for that element inside the square bracket. In this article, we will take two arrays and find only the common elements present in ... Read More

165 Views
This tutorial will discuss how to write swift program to check whether a number can be expressed as a sum of two prime numbers. Prime numbers are those numbers that are greater than 1 and has exactly two factors that is 1 and the number itself. For example, 7 is the prime number because it has only two factors that are 1 and 7. Here we check that the given number can be expressed as Sum of two prime numbers. For example − Number = 10 So 10 can be expressed as a sum of prime numbers − 3+7 ... Read More

449 Views
Arrays are specialized data structures that are used to retain homogenous (similar) data in a series of memory regions. The key benefit of using arrays is that we can use the index parameter to access them from anywhere we want. However, sequential operations are required to insert and delete data, which turns this data structure into a linear data structure. We can simply utilise the index or position number for that element inside the square bracket alone to fetch it from an array. This article will demonstrate how to read the most recent k numbers from an array in C++. ... Read More

1K+ Views
Arrays are special data structures which are used to store or hold similar kind of data (homogeneous data) in consecutive memory locations. The great advantage of using arrays is that, we can access them from any location we want using the index parameter. But to insert and delete it needs sequential operations which makes this data structure a linear data structure. To retrieve an element from array, we can simply use the index or the position number for that element inside the square bracket only. In this article we will see how we can read first k given numbers from ... Read More