Arnab Chakraborty has Published 4458 Articles

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

155 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

223 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

57 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

310 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

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

Average of first n odd naturals numbers?

Arnab Chakraborty

Arnab Chakraborty

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

177 Views

Here we will see how to get the average of n odd natural numbers. The n is given by the user. To get the ith odd number we can use this formula 2*i+1. Here also we are using this formula. Let us see the algorithm to get the clear idea.AlgorithmavgOddNaturalNumber(n)Begin ... Read More

Bash program to check if the Number is a Palindrome?

Arnab Chakraborty

Arnab Chakraborty

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

4K+ Views

To check whether a number is palindrome or not, we have to reverse the number, and then if the actual number and the reversed number are same, then this is palindrome. In Bash, performing the reverse operation is very easy. We have to use the ‘rev’ command to do that. ... Read More

Bash program to find A to the power B?

Arnab Chakraborty

Arnab Chakraborty

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

2K+ Views

Here we will see how to get the number A raise to the power B using bash script. The logic is very simple. We have to use the ‘**’ operator or power operator to do this. Let us see the following program to understand the concept clearly.Example#!/bin/bash # GNU bash ... Read More

Bisymmetric matrix in C++?

Arnab Chakraborty

Arnab Chakraborty

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

86 Views

Here we will see one program that will help to check whether a matrix is bisymmetric or not. The Bisymmetric matrix is one square matrix that are symmetric about both of the major diagonals. The below matrix is an example of bisymmetric matrix.1 2 3 4 5 2 6 7 ... Read More

Advertisements