Arnab Chakraborty has Published 4453 Articles

C++ Program to pass a string to the function

Arnab Chakraborty

Arnab Chakraborty

Updated on 19-Oct-2022 12:42:32

20K+ Views

Any programming language that uses functions has code that is simpler, more modular, and simpler to change while being debugged. Functions are a remarkably beneficial component in a modular piece of code. A function can take arguments and perform certain operations on them. Like other primitive datatypes, we can also ... Read More

C++ Program to Convert Vector to a List

Arnab Chakraborty

Arnab Chakraborty

Updated on 19-Oct-2022 12:37:53

2K+ Views

Vectors in C++ are dynamic arrays that can contain any type of data, it can be user-defined or primitive. Dynamic is in the sense that the size of a vector can increase or decrease according to the operations. Vectors have support for various functions, for which data manipulation is very ... Read More

C++ Program to Convert Array to Set (Hashset)

Arnab Chakraborty

Arnab Chakraborty

Updated on 19-Oct-2022 11:22:52

4K+ Views

The array is a data structure that is available in C++ and is used to hold a sequential collection of elements of the same type. An array has a size that is fixed, but can be expanded or shrank if needed. It is important to think of an array as ... Read More

C++ Program to convert primitive types to objects

Arnab Chakraborty

Arnab Chakraborty

Updated on 19-Oct-2022 11:21:14

1K+ Views

Primitive datatypes in C++ are datatypes that are predefined in the language itself; like int, float, double, etc. Objects are instances of a class, and C++ being an object-oriented language, conversion between primitive data types and objects is necessary. A class serves as a data type's architectural plan. Although this ... Read More

C++ Program to convert double type Variables into int

Arnab Chakraborty

Arnab Chakraborty

Updated on 19-Oct-2022 11:17:09

2K+ Views

In C++, variables of the int type can only hold positive or negative integer values; they cannot hold fractional values. There are float and double values available for this purpose. In order to store fractional numbers with up to seven digits after the decimal point, double datatype was created. Integer ... Read More

C++ Program to convert int Variables into double

Arnab Chakraborty

Arnab Chakraborty

Updated on 19-Oct-2022 11:14:22

9K+ Views

Int type variables in C++ are used to contain positive or negarive integer values, but this type is unable to contain fractional values. For that, there are float and double values. Double datatype is specifically designed to hold fractional values upto seven digits after the decimal point. Conversion between integer ... Read More

C++ Program to Convert int Type Variables into String

Arnab Chakraborty

Arnab Chakraborty

Updated on 19-Oct-2022 11:11:18

240 Views

Integer type variables in C++ are able to store positive or negative integer values upto a predefined range. String variables can store a sequence of alphabets, numerals, and special characters. There are many use cases where the conversion from int to string is needed. We discuss 3 different methods to ... Read More

C++ Program to Convert String Type Variables into Boolean

Arnab Chakraborty

Arnab Chakraborty

Updated on 19-Oct-2022 11:09:27

5K+ Views

In C++, Boolean variables consists of binary data true or false and string variables are a sequence of alphabets, numerals, and special characters. Conversion between string to Boolean isn’t possible natively by the compiler, but there are several ways to perform this conversion. We explore the various ways using which ... Read More

C++ Program to convert Boolean Variables into String

Arnab Chakraborty

Arnab Chakraborty

Updated on 19-Oct-2022 11:07:37

3K+ Views

Boolean variables in C++ can contain only two distinct values, ‘true’ or ‘false’. If we translate these values to string, ‘true’ will be mapped to ‘1’ and ‘false’ will be mapped to ‘0’. Boolean values are mainly used to check if a condition in a program has been met or ... Read More

C++ Program to Convert int Type Variables to long

Arnab Chakraborty

Arnab Chakraborty

Updated on 19-Oct-2022 11:01:52

7K+ Views

C++ is a statically typed language, and because of that all of its variables require the datatype to be declared beforehand. The datatypes are used to represent which type of value is contained inside a variable. In C++, the variables to contain numerical values are int, long, float, and double. ... Read More

Advertisements