M3S2 Part 1 Flashcards

1
Q

elements of c++

A
  1. character set
  2. keywords
  3. data types
  4. Identifiers
  5. Operators
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Characters that can be used in a program are:

A
  • Lowercase letters (a-z)
  • Uppercase letters (A-Z)
  • Digits (0-9)
  • Special Characters (+,-,*,/,=,(,),{,}……)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

reserved words with special meaning in C++.

A

keywords

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

must not be used as constant or

variable or any other identifier names.

A

keywords

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

are case sensitive and should be

in lowercase.

A

keywords

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

Other names which you should not use as variables are the

names of

A

data types such as int, char, float.

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

a name used to identify a variable, function, class,

module, or any other user-defined item.

A

identifier

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

starts with a letter A to Z or a to z or an underscore (_)

followed by zero or more letters, underscores, and digits (0 to 9)

A

identifier

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

does c++ allow punctuation characters within identifiers?

A

no

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

also known as user-defined identifier

A

variable

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

It is a data
storage location that has a value, which can change during
program execution.

A

variable

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

All variables in C++ must be declared prior to their use

A

true

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

Characters a to z and A to Z

(NOTE: upper case and lower case are not distinct) in variables

A

false

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

first character of a variable must be a

A

letter

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

only what may follow the initial letter

A

letters, digits or underscores

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

what are not allowed in variables

A

Blank spaces and special characters

17
Q

used to

tell the variables the type of data it can store.

A

data types

18
Q

All variables use this during declaration to restrict the type of
data to be stored.

A

data-type

19
Q

requires different amount of memory.

A

Every data type

20
Q

are built-in or predefined data types and can

be used directly by the user to declare variables.

A

Primitive Data Types