chapter 4: DATATYPE .....
By dholey
@dholey (1383)
India
6 responses
@satya_music (586)
• India
27 Dec 06
data types are group of words used for making variables
some languages are not having data types they are called typeless languages like b ,a,bcpl etc
data types of foxpro
character
number
date
logical
float
picture
memo
data types in c :-
char
int
float
double
short
long
signed
unsigned
WE CAN CREATE OUR OWN DATATYPES USING sruct and union
DATATYPES IN VB:-
byte
boolean
string
integer
float
long
single
double
date
currency
variant
object
datatypes IN C++ ,VC++ AND JAVA , the basic data types are SAME AS c , but we have object orientation with CLASS we can have object of class (object is a variable of class type datatype)
@swaroop_sv2003 (531)
• India
18 Dec 06
Computer uses special internal codes to keep track of different types of data it processes. This helps it to distinguish different data from one another. For example: When a programmer uses an integer in his program the computer cannot understand that it is an integer. It can also be a string. So a programmer explicitly declares his data as integer. Various data types in C programing are
1) Integer (int) 4 bytes
2) Character (char) 1byte
3) Short int (short) 2bytes
4) long int (Long) 4bytes
5) Float 4bytes
Compiler on encountering a datatype in a program will allocate a fixed byte for that variable. Each type of data requires different type of memory size. If variable A is declared as int then the system would allocate 4 bytes for variable A.
1 person likes this
@dholey (1383)
• India
19 Dec 06
it is a real answer , so VARIABLES ARE special words ,using them programmer can create variables , datatypes specifies the type of data, that is , what type of value that variable is going to deal with, in c and c++ data types are categorized in three groups
1. BASIC DATA TYPES
2. MODIFIERS FOR BASIC DATA TYPES
3. USER DEFINED DATA TYPES
basic data types are listed below
1. char SIZE 1 BYTE RANGE :- -128 T0 127
2. int SIZE 2 BYTES RANGE -32768 TO 32767
3. float SIZE 4 BYTES RANGE 1.1 * 10 ^-38 TO 1.1 * 10 ^ 37
4. double SIZE 8 BYTES RANGE 1.1 * 10 ^-308 TO 1.1 * 10 ^307
MODIFIERS FOR BASIC DATATYPE
1.short [ DEFAULT]
2.long
3.signed [DEFAULT]
4.unsigned
USER DEFINED DATATYPES:- we can create ur own datatype using few keywords
like
enum
struct
union
class (not in c but in c++)
1 person likes this
@mansha (6298)
• India
18 Dec 06
it can be defined as classification of a particular type of information. It is easy for humans to distinguish between different types of data. We can usually tell at a glance whether a number is a percentage, a time, or an amount of money.Similarly, a computer uses special internal codes to keep track of the different types of data it processes.ost programming languages require the programmer to declare the data type of every data object, and most database systems require the user to specify the type of each data field. The available data types vary from one programming language to anotherbut the following usually exist in one form or another:
integer : In more common parlance, whole number; a number that has no fractional part.
floating-point : A number with a decimal point. For example, 3 is an integer, but 3.5 is a floating-point number.
Strings:String data is non-numerical, and is used to store characters and words. All strings consist of characters enclosed within double quotation marks. The string data can include numbers and other numerical symbols but will be treated as text.
@kingadnan (1538)
• Pakistan
18 Dec 06
In programming, classification of a particular type of information. It is easy for humans to distinguish between different types of data. We can usually tell at a glance whether a number is a percentage, a time, or an amount of money. We do this through special symbols -- %, :, and $ -- that indicate the data's type. Similarly, a computer uses special internal codes to keep track of the different types of data it processes.
Most programming languages require the programmer to declare the data type of every data object, and most database systems require the user to specify the type of each data field. The available data types vary from one programming language to another, and from one database application to another, but the following usually exist in one form or another:
# integer : In more common parlance, whole number; a number that has no fractional part.
# floating-point : A number with a decimal point. For example, 3 is an integer, but 3.5 is a floating-point number.
# character (text ): Readable text
@Sportello (97)
• Italy
17 Dec 06
The datatype is an attribute of a variable which implicitly specifies the format and size of the variable, where the size indicates the number of bit used and the format how the bit are organized to represent the data.
In C the basic datatypes are:
char, 1 byte
int, 2 or 4 bytes depending on the system
short, 2 bytes
long, 4 bytes
float, 4 bytes
double, 8 bytes
long double, 10 bytes
1 person likes this