Arnab Chakraborty has Published 4452 Articles

What's the difference between sizeof and alignof?

Arnab Chakraborty

Arnab Chakraborty

Updated on 30-Jul-2019 22:30:26

409 Views

Here we will see what are the differences of sizeof and the alignof operator in C++. The alognof() operator is introduced in C++11.The alignof() operator is used to get the alignment in bytes. It requires instances of type. the type is either complete type or a reference type. There is ... Read More

All permutations of a string using iteration?

Arnab Chakraborty

Arnab Chakraborty

Updated on 30-Jul-2019 22:30:26

556 Views

In this section we will see how to get all permutations of a string. The recursive approach is very simple. It uses the back-tracking procedure. But here we will use the iterative approach.All permutations of a string ABC are like {ABC, ACB, BAC, BCA, CAB, CBA}. Let us see the ... Read More

All reverse permutations of an array using STL in C++?

Arnab Chakraborty

Arnab Chakraborty

Updated on 30-Jul-2019 22:30:26

166 Views

In this section we will see how to generate all reverse permutations using the STL in C++. The forward and reverse permutation of some numbers like (1, 2, 3) will be like below −Forward permutation1, 2, 3 1, 3, 2 2, 1, 3 2, 3, 1 3, 1, 2 3, ... Read More

Area of triangle formed by the axes of co-ordinates and a given straight line?

Arnab Chakraborty

Arnab Chakraborty

Updated on 30-Jul-2019 22:30:26

83 Views

Here we will see how to get the area of a triangle formed by the x and y axis and another straight line. The diagram will be look like below. The equation of the straight line is −𝑎𝑥+𝑏𝑦+𝑐=0The line is cutting the x-axis at the point B, and cutting the ... Read More

Argument Coercion in C/C++?

Arnab Chakraborty

Arnab Chakraborty

Updated on 30-Jul-2019 22:30:26

1K+ Views

Here we will see about the argument coercion in C or C++. The Argument Coercion is one technique by which the compiler can implicitly convert the arguments from one type to another type. It follows argument promotion rule. If one argument is lower datatype, that can be converted into higher ... Read More

Arrange given numbers to form the biggest number?

Arnab Chakraborty

Arnab Chakraborty

Updated on 30-Jul-2019 22:30:26

173 Views

Here we will see how to generate the biggest number by rearranging the given numbers. Suppose there are {45, 74, 23} is given, the program will find the largest number, that is 744523. So each digit will not be arranged. but the whole number will be placed to make largest ... Read More

Array get() function in C++ STL?

Arnab Chakraborty

Arnab Chakraborty

Updated on 30-Jul-2019 22:30:26

231 Views

In this section we will see the get() function of array in C++ STL. This function is used to get the ith element of the array container. The syntax is like below −Syntaxget array_nameThis function takes two mandatory parameters. The is the index parameter. It is used to point to ... Read More

Array::crbegin() and array::crend() in C++ STL?

Arnab Chakraborty

Arnab Chakraborty

Updated on 30-Jul-2019 22:30:26

69 Views

Here we will see the crbegin() and crend() functions of array in C++ STL.The array::crbegin() function is used to get reverse iterator. It returns constant reverse iterator pointing to the last element of the container. This function does not take any parameter.The array::crend() function is reverse of crbegin(). This returns ... Read More

Array::fill() and array::swap() in C++ STL?

Arnab Chakraborty

Arnab Chakraborty

Updated on 30-Jul-2019 22:30:26

360 Views

In this section we will see what are the usage of array::fill() and the array::swap() in C++ STL.The array::fill() function is used to fill the array with some specified value. Let us see one example to get the idea.Example Live Demo#include #include using namespace std; main() {    array arr = ... Read More

ASCII NUL, ASCII 0 (‘0’) and Numeric literal 0?

Arnab Chakraborty

Arnab Chakraborty

Updated on 30-Jul-2019 22:30:26

7K+ Views

Here we will see the ASCII NUL, ASCII 0 and the Numeric Literal 0. The ASCII null is represented as 0x00, and zero is represented as 0x30. The ASCII NUL character is used to denote the end of the string in C or C++. When programmer used ‘0’ (character 0) ... Read More

Advertisements