Sudhir sharma has Published 1206 Articles

Array implementation of queue in C++

sudhir sharma

sudhir sharma

Updated on 24-Oct-2019 08:57:49

2K+ Views

A queue is a linear data structure in which the order of operation is FIFO (first in first out).The array is a data structure that contains elements of the same data type, stored in continuous memory location.In queue the insertion and deletion operations as done at opposite ends of the ... Read More

Array data() in C++ STL with Examples

sudhir sharma

sudhir sharma

Updated on 24-Oct-2019 08:54:00

363 Views

The array is a collection of elements of the same data type stored in continuous memory locations.C++ standard library contains many libraries that support the functioning of arrays. One of them is an array data() method.The array data() in c++ returns a pointer pointing to the first element of the ... Read More

array at() function in C++ STL

sudhir sharma

sudhir sharma

Updated on 24-Oct-2019 08:50:35

321 Views

An array is a collection of elements of the same data type stored in continuous memory locations.In c++ standard library (STL) there are a lot of methods to support the functioning of the array. One of them is an array at() method.The array at() method is used to return the ... Read More

arg() function for Complex Number in C++

sudhir sharma

sudhir sharma

Updated on 24-Oct-2019 08:48:28

504 Views

A complex number is a number that is expressed in the form of a + bi, where a and b are real numbers. i is the imaginary part of number.The argument is the angle between the positive axis and the vector of the complex number. For a complex numberz = ... Read More

Arrays in C/C++ program

sudhir sharma

sudhir sharma

Updated on 24-Oct-2019 08:44:50

904 Views

The array is a collection of a fixed number of items of the same data type. These elements are stored in contiguous memory locations in the memory.Every single element of the value can be accessed from its index value using the brackets “[]” and the array name like a[4], a[3], ... Read More

Arithmetic Number in C++

sudhir sharma

sudhir sharma

Updated on 24-Oct-2019 08:31:57

247 Views

The arithmetic number is a number which has the average of all positive divisors is an integer i.e. for a number n if the number of divisors can divide the sum of divisors then n is an arithmetic number.Let’s take an example to understand the concept better, Input : n ... Read More

Area of a triangle inside a parallelogram in C++

sudhir sharma

sudhir sharma

Updated on 24-Oct-2019 08:27:44

218 Views

The area of a figure is the extent of the figure in two-dimensional plane.Triangle is a polygon with three sides.Parallelogram is a quadrilateral with opposite sides equal and parallel.In this program, we have a parallelogram with its base and height and it inscribed a triangle the same base as the ... Read More

Area of a square from diagonal length in C++

sudhir sharma

sudhir sharma

Updated on 24-Oct-2019 08:21:04

224 Views

The area of a figure is the extent of the figure in two-dimensional plane.Square is a quadrilateral with all its sides equal and all internal angles are right angles.Diagonal of a polygon is the line joining two sides that are not adjacent to each other.ac and bd are the diagonal ... Read More

Apothem of a n-sided regular polygon in C++

sudhir sharma

sudhir sharma

Updated on 24-Oct-2019 08:17:10

191 Views

n-sided regular polygon is a closed figure of n sides that has all sides and angles of equal length. The below figure shows a 6 sided regular polygon commonly known as hexagon.Apothem is a line in the polygon that connects the center of the figure to the side. And it ... Read More

An Uncommon representation of array elements in C++ program

sudhir sharma

sudhir sharma

Updated on 24-Oct-2019 08:11:58

74 Views

An array is a linear data structure that stores elements the same data type. To access a single data element of the array, there is a standard way that is commonly used.Syntaxarray_name[index];Example Live Demo#include using namespace std; int main( ){    int arr[2] = {32, 65};    printf("First Element = ... Read More

Advertisements