UNIT 2 2.2 Data Types Flashcards

1
Q

It is whole number consisting of an optional sign (+ or -) followed by a
sequence of digit. It cannot contain commas. Variables of this type are often used for controlling
loops and conditional statements.

A

int variables

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

It consists of an optional sign (+ or -), followed by one or more digits, a decimal point,
and or one or more further digits. It occupies 4 bytes. It can include an optional exponent
ranging from 3.4 E to -38 to 3.4 E +38

A

float

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

is a special float which can store more significant digits
and have a longer exponent. It occupies 8 bytes in the memory.
It ranges from 1.7 E – 308 to 1.7 E +308

A

double (double precision)

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

It is a single letter, digit, punctuation mark or control symbol recognized by the computer. Written enclosed within single quotation marks, but literals string are enclosed in double quotation marks . A character may be
assigned an integer value between -128 and +127. Unsigned char data type may be assigned an integer value from 0 to 255.

A

char

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

valueless

A

void

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

Three uses of void:

A
  1. To declare explicitly a function as returning no value.
  2. To declare explicitly a function having no parameters.
  3. To create generic pointers.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly