Data Types Flashcards

1
Q

Data Types

A

Data types in c refer to an extensive system used for declaring variables or functions of different types. The type of a variable determines how much space it occupies in storage and how the bit pattern stored is interpreted.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Basic Types

A

They are arithmetic types and are further classified into: (a) integer types and (b) floating-point types.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Enumerated types

A

They are again arithmetic types and they are used to define variables that can only assign certain discrete integer values throughout the program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

The type void

A

The type specifier void indicates that no value is available.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Derived types

A

They include (a) Pointer types, (b) Array types, (c) Structure types, (d) Union types and (e) Function types.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Integer Types - char

A

Storage size _ 1 byte

Value range _ -128 to 127 or 0 to 255

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

unsigned char

A

Storage size _ 1 byte

Value range _ 0 to 255

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

signed char

A

Storage size _ 1 byte

Value range _ -128 to 127

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

int

A

Storage size _ 2 or 4 bytes

Value range _ -32,768 to 32,767 or -2,147,483,648 to 2,147,483,647

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

unsigned int

A

Storage size _ 2 or 4 bytes

Value range _ 0 to 65,535 or 0 to 4,294,967,295

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

short

A

Storage size _ 2 bytes

Value range _ -32,768 to 32,767

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

unsigned short

A

Storage size _ 2 bytes

Value range _ 0 to 65,535

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

long

A

Storage size _ 8 bytes or (4bytes for 32 bit OS)

Value range _ -9223372036854775808 to 9223372036854775807

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

unsigned long

A

Storage size _ 8 bytes

Value range _ 0 to 18446744073709551615

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

sizeof operator

A

To get the exact size of a type or a variable on a particular platform, you can use the sizeof operator. The expressions sizeof(type) yields the storage size of the object or type in bytes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Floating-Point Types

Type _ float

A

Storage size _ 4 byte
Value range _ 1.2E-38 to 3.4E+38
Precision _ 6 decimal places

17
Q

Floating-Point Types

Type _ double

A

Storage size _ 8 byte
Value range _ 2.3E-308 to 1.7E+308
Precision _ 15 decimal places

18
Q

Floating-Point Types

Type _ long double

A

Storage size _ 10 byte
Value range _ 3.4E-4932 to 1.1E+4932
Precision _ 19 decimal places