CH 1,2,3 Flashcards

1
Q

Design an algorithm to find the perimeter and area of a rectangle.

A
  1. Get the length of the rectangle.
  2. Get the width of the rectangle.
  3. Find the perimeter using the following equation:
    perimeter = 2∙ (length + width)
  4. Find the area using the following equation:
    Area = length ∙ width
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Design an algorithm to find the perimeter and area of a rectangle.

A
  1. Get the length of the rectangle.
  2. Get the width of the rectangle.
  3. Find the perimeter using the following equation:
    perimeter = 2∙ (length + width)
  4. Find the area using the following equation:
    Area = length ∙ width
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
A

is an operator called the stream insertion/extraction operator.

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

which is a data type that deals with integers, or numbers without a decimal part.

A

Integral

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

which is a data type that deals with decimal numbers.

A

Floating-point,

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

Int values=

A

-2^31 to 2^31 storage 4 bytes

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

bool values=

A

true and false storage 1 byte

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

char values=

A

-2^7 to 2^7 storage 1 byte

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

long long values=

A

-2^63 to 2^63 storage 64 bytes

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

Double value-

A

-1.710^308 to 1.710^308 storage 8 bytes

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

Float value

A

-3.410^38 to 3.410^38 storage 4 bytes

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

Char-

A

data type, you enclose each character represented within single quotation marks.

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

Binary operator- EX.

A

an operator that has two operands. Ex. 3+4

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

Declaration statements- EX.

A

are used to declare things, such as variables. Ex. int a, b, c;

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

Executable statements- EX.

A

perform calculations, manipulate data, create output, accept input. Ex.a = 4; cin&raquo_space; b; cout

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

include -

A

library for common input and output

17
Q

Resesved words- ex.

A

also called keywords, each considered to be a single symbol. Ex. int, float, double, char, const, void, return.

18
Q

String-

A

a sequence of zero or more characters, anything in double quotes.

19
Q

Variable-

A

is a memory location whose contents can be changed.

20
Q
A

is an operator called the stream insertion/extraction operator.

21
Q

which is a data type that deals with integers, or numbers without a decimal part.

A

Integral

22
Q

which is a data type that deals with decimal numbers.

A

Floating-point,

23
Q

Int values=

A

-2^31 to 2^31 storage 4 bytes

24
Q

bool values=

A

true and false storage 1 byte

25
Q

char values=

A

-2^7 to 2^7 storage 1 byte

26
Q

long long values=

A

-2^63 to 2^63 storage 64 bytes

27
Q

Double value-

A

-1.710^308 to 1.710^308 storage 8 bytes

28
Q

Float value

A

-3.410^38 to 3.410^38 storage 4 bytes

29
Q

Char-

A

data type, you enclose each character represented within single quotation marks.

30
Q

Binary operator- EX.

A

an operator that has two operands. Ex. 3+4

31
Q

Declaration statements- EX.

A

are used to declare things, such as variables. Ex. int a, b, c;

32
Q

Executable statements- EX.

A

perform calculations, manipulate data, create output, accept input. Ex.a = 4; cin&raquo_space; b; cout

33
Q

include -

A

library for common input and output

34
Q

Resesved words- ex.

A

also called keywords, each considered to be a single symbol. Ex. int, float, double, char, const, void, return.

35
Q

String-

A

a sequence of zero or more characters, anything in double quotes.

36
Q

Variable-

A

is a memory location whose contents can be changed.