M3S2 Part 2 Flashcards

1
Q

are built-in or predefined data types and can

be used directly by the user to declare variables.

A

Primitive Data Types

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

Primitive data types available in C++ are:

A

Integer Double Floating Point
Character Valueless or Void
Boolean Wide Character
Floating Point

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

are used
with the built-in data types to
modify the length of data that a
particular data type can hold.

A

Datatype Modifiers

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

Data type modifiers available in

C++ are:

A

Signed
Unsigned
Short
Long

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

the data type used for storing (+/-) whole numbers

A

Integer 4 bytes

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

the data type used for storing characters

A

Character 1 byte

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

the data type used for storing logical values

A

Boolean

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

A

boolean variable can store either

A

true or false

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

the data type used for storing single precision floating

point values or decimal values

A

Floating Point 4 byte

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

the data type used for storing double

precision floating point values or decimal values.

A

Double Floating Point 8 byte

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

the data type that represents a valueless entity or without any value.

A

void

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

It is used for those function which does not returns a value.

A

void data type

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

this data type is also a character data type but this

data type has size greater than the normal 8-bit datatype.

A

Wide Character
2 or 4 bytes
wchar_t.

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

char name variable can store up to how many character inputs?

A

20

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q
The other way to initialize variables is
done by enclosing the initial value
between parentheses ().
A

constructor initialization

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

3 places in a C++ program where variables can be declared:

A
  1. outside of all functions
  2. inside the functions
  3. in the declaration of a formal parameter of a function.
17
Q

Outside of all functions, including the main() function

may be used by any part of the
program.

A

global

18
Q

Inside the function

may be used only by statements that are also in
the same function.

A

local

19
Q

is any expression that has a fixed value.

A

constant

20
Q

draw constant diagram

A

constant

  1. numeric
    * integer
    * real
  2. character
    * single character
    * string
21
Q

A character is enclosed between what

A

single quotes

22
Q

contains a series of characters enclosed by

double quotation.

A

String constant

23
Q

are specified as numerical (whole number)
constants without fractional components. No need to write
quotes (“) to express a numerical constant.

A

Integer numbers

24
Q

require the use of decimal point
followed by the number’s fractional component. It may include a
decimal point, an e character or both.

A

Floating-point constants

25
Q

you can declare constants with a specific

type in the same way as you would do with a variable

A

With the const keyword