Definition of data type in visual basic
Answers
Answer:
Data Types:
The data type of a value (or variable in some contexts) is an attribute that tells what kind of data that value can have.
Data types include the storage classifications like integers, floating point values, strings, characters etc.
Data types define particular characteristics of data used in software programs and inform the compilers about predefined attributes required by specific variables or associated data objects.
Data types in visual basic :
1. Numeric
- Byte Store integer values in the range of 0 - 255
2. Integer Store integer values in the range of (-32,768) - (+ 32,767)
3. Long Store integer values in the range of (- 2,147,483,468) - (+ 2,147,483,468)
4. Single Store floating point value in the range of (-3.4x10-38) - (+ 3.4x1038)
5. Double Store large floating value which exceeding the single data type value
6. Currency store monetary values. It supports 4 digits to the right of decimal point and 15 digits to the left
2. String
Use to store alphanumeric values. A variable length string can store approximately 4 billion characters
3. Date
Use to store date and time values. A variable declared as date type can store both date and time values and it can store date values 01/01/0100 up to 12/31/9999
4. Boolean
Boolean data types hold either a true or false value. These are not stored as numeric values and cannot be used as such. Values are internally stored as -1 (True) and 0 (False) and any non-zero value is considered as true.
5. Variant
Stores any type of data and is the default Visual Basic data type. In Visual Basic if we declare a variable without any data type by default the data type is assigned as default.
#answerwithquality & #BAL