Sudhir sharma has Published 1149 Articles

Assigning an integer to float and comparison in C/C++

sudhir sharma

sudhir sharma

Updated on 24-Oct-2019 10:41:40

2K+ Views

The integer is a data type used to define a number that contains all positive, negative or zero non-fractional values. These cannot have decimals.Float is a data type used to define a number that has a fractional value. These can have decimals also.Now, we will check what will be the ... Read More

Array Type Manipulation in C++

sudhir sharma

sudhir sharma

Updated on 24-Oct-2019 10:34:14

2K+ Views

The array is a data structure in c++ that stored multiple data elements of the same data type in continuous memory locations.In c++ programming language, there are inbuilt functions to manipulate array types. Some functions can also be applied to multidimensional arrays. The array header file contains functions to manipulate ... Read More

Array implementation of queue in C++

sudhir sharma

sudhir sharma

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

3K+ 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

446 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

468 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

681 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

390 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

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

sudhir sharma

sudhir sharma

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

256 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 interesting time complexity question in C++

sudhir sharma

sudhir sharma

Updated on 24-Oct-2019 08:09:38

1K+ Views

Time complexity can be defined as the time required by the algorithm to run its average case.Let's see and calculate the time complexity of some of the basic functions.Methodvoid counter(int n){    for(int i = 0 ; i < n ; i++){       for(int j = 1 ; j

Advertisements