Chapter 1: A tutorial introduction Flashcards

1
Q

delaration

A

A declaration announces the properties of variables; it consists of a name and a list of variables.

ex:
int fahr, celcius;
int lower, upper, step;

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

type int

A

the variable is an integer. Its size depends on the machine. Commonly 16-bit ints (between -32768 and +32767) or 32-bit (between -10^38 and + 10^38)

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

type float

A

floating point i.e. numbers that may have a fractional part. Also depends on the machine you are using.

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

type char

A

character - a single byte

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

type short

A

short integer

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

type long

A

long integer

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

double

A

double-precision floating point.

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

%d

A

print as decimal integer

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

%6d

A

print as decimal integer, at least 6 characters wide

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

%f

A

print as floating point.

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

%6f

A

print as floating point, at least 6 characters wide

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

%.2f

A

print as floating point, 2 characters after the decimal point

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

%6.2f

A

print as floating point at least 6 characters wide and 2 after decimal point

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

define

A

defines a symbolic name or a symbolic constant to be a particular string of characters.

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

text stream

A

a sequence of characters divided into lines; each line consists of zero or more characters followed by a newline character.

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