MODIFIER IN C++
By this modifier we can increase and decrease the storage
range of the data type.
For example:-
Storage space
for int data type is 4 byte for 32 bit processor. We can increase the range by
using long int which is 8 byte. We can decrease the range by
using short int which is 2 byte.
In a C++ data modifier are
divide into four type:-
v 👉 Long
v 👉 Short
v 👉 Signed
v 👉 Unsigned
DATA TYPE |
SIZE IN BYTES |
EXAMPLE |
DEFINITION |
Short |
2 |
short int a; |
Occupies 2 bytes of
memory space in every operating system |
Long |
At least 4 bytes |
long a; |
In long modifier we did not need to
write data type name because it default for int data type. |
Unsigned long |
4 |
Unsigned long int a; |
Used for positive
large integers. |
Long long |
8 |
Long long int a; |
Used for very large integers. |
Unsigned long long |
8 |
Unsigned long long int
a; |
Used for very large positive
integers. |
long double |
10 bytes |
long double a; |
Used for large floting point number. |
Signed char |
1 |
Char a; |
Used for character (in
range -127 to 127). |
Unsigned char |
1 |
Unsigned char a; |
Used for character (in range 0 to 255). |
Signed int |
4 |
Signed int a; |
Used for integers. |
Unsigned int |
4 |
Unsigned int a; |
Used for non-negative integers. |
Data science & data analyst
- Data Cleaning and Preprocessing in Data Science
- Advanced Data Analysis Techniques: Unlocking Insights from Data
- Data Visualization Techniques in Data Science
- Descriptive Statistics in Data Sci
- Data Science Tools and Techniques
- Scope of Data Science
- Why learn Data Science? | Why Data Science?
- Impact of Data Science
- The Importance of Data in Science | Introduction to Data Science
- What is Data Analysis | Data Analyst for Beginners
C++
- Introduction of C++ || Definition of C++
- Brief history of C++ || history of C++
- Features of C++ || why we use C++ || concept of C++
- Concept of OOP || What is OOP || Object oriented programming language
- Difference Between OOP And POP || Different Between C and C++
- Characteristics of C++
- Interesting fact about C++ || Top 10 interesting fact about C++
- C++ Program Structure
- Writing first program in C++ || how to write hello world in C++
- Basic Data Type And Variable In C++
- Identifier in C++
- Keywords in C++
- Token in C++
- Comment in C++
- Constant in C++
- Modifier in C++
- Taking User Input in C++ | User input in C++
- Input Output Operator In C++
- C++ Operators | Operator in programming language
- How to Add two number in C++
- Polymorphism in C++
- Compile Time Polymorphism in C++
- Function overloading in C++
- Operator Overloading in C++
- What are Control Structures in C++ || Understanding Control Structures in C++ | How to use if, else, switch
- What are Functions and Recursion in C++ | How to Defining and Calling Functions
- Class in C++
- Object in C++