My Blog

My WordPress Blog

My Blog

My WordPress Blog

1. Basics

Modifier Types

C++ allows the char, int, and double data types to have modifiers preceding them. A modifier is used to alter the meaning of the base type so that it more precisely fits the needs of various situations. The data type modifiers are listed here − The modifiers signed, unsigned, long, and short can be applied to integer base types. In addition, signed and unsigned can be applied […]

Constants/Literals

Constants refer to fixed values that the program may not alter and they are called literals. Constants can be of any of the basic data types and can be divided into Integer Numerals, Floating-Point Numerals, Characters, Strings and Boolean Values. Again, constants are treated just like regular variables except that their values cannot be modified after their definition. Integer Literals […]

Declare Multiple Variables

C++ programming language allows programmers to declare multiple variables in a single statement without any line breaks. This is only possible for variables which belong to the same data type. How to Declare Multiple Variables in C++? This is executed using a comma (,) separated list of variables with different variables names, and the data types must be the […]

Character (char) Data Type

The character (char) data type in C++ stands for alphanumeric values, which can be a wide range of characters. These may include alphabets like ‘a’, ‘b’, and ‘c’, numeric values like ‘1’, ‘2’, and ‘3’, symbols like ‘#’, ‘$’, and ‘&’, and many more. The character data type takes 1 Byte (i.e., 8 bits) of memory space to store […]

Boolean (bool) Data Type

The bool data type in C++ stands for Boolean values, which are True and False. In C++, 1 stands for True whereas 0 stands for False. The keyword “bool” is used to declare a Boolean data type. The addition of bool data type is a one of the newer features of C++ language. Use of Boolean Data Type The Boolean (bool) data type is used in the following ways […]

Scroll to top