LESSON 4 Flashcards

1
Q

are used for storing texts.

A

Strings

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

contains a collection of characters surrounded by double quotes.​

A

string variable

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

To use strings, you must include an additional header file in the source code,

A

include <string></string>

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

To get the length of a string, use the _________ function.

A

length ()

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

==
!=
>
>=
<
<=

A

equal to
not equal to
greater than
greater than or equal to
less than
less than or equal to

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

!
&&
||

A

Logical NOT
Logical AND
Logical OR
Logical Exclusive OR (XOR)

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

means that it should produce correct and faster results, taking into account all the memory constraints.

A

Good Program

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

4 Characteristics of Good Programming

A

1) Clarity and Simplicity of Expression​

2) Use of proper names for identifiers​

3) Comments​

4) Indentation​

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

Expressions are use to implement a particular task. It is a combination of Operators, Operands, and Constants. Any expression used in the program should be understood by the user. ​

A

1) Clarity and Simplicity of Expression​

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

Identifiers are user defined names. They are use to name things. A name is associated with a function or data object (constants and variables) and used to refer to that function or data object. Identifiers are made up of letters (A-Z, a-z), digits (0-9), and the underscore character ( _ ). They, however, must begin with a letter or underscore and not with a digit.​

A

2) Use of proper names for identifiers​

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

They are usually added with the purpose of making the source code easy to understand. Hence, add ___________to your code in simple English language that describes the function of the code and the reason for your decision to do it in a particular way as well.​

A

3) Comments​

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

Leading white space (spaces and tabs) at the beginning of each statement, which is used to determine the group of statements, is known as _________.​

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

A computer program should have some important characteristics, which are as follows :

A

1) Flexibility​

2) User Friendly​

3) Portability​

4) Reliability​

5) Self-Documenting Code​

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

A program should be _______ enough to handle most of the changes without having to rewrite the entire program.​

A

Flexibility; flexible

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

A program that can be easily understood by a beginner is called

A

2) User-Friendly

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

It must interact with the user through understandable messages. In addition, the proper message for the user to input data and to display the result, besides making the program easily understandable and modifiable.​

A

2) User-Friendly

17
Q

refers to the ability of an application to run on different platforms (operating systems) with or without minimal changes. Since the change of platform is a common phenomenon nowadays, due to the developments in hardware and the software, portability has to be taken care of it.​

A

3) Portability

18
Q

It is the ability of a program to do its intended function accurately even if there are even small changes in the computer system.​

Moreover, the program must be able to handle unexpected situations like wrong input or no input.​

A

​4) Reliability

19
Q

The source code, which uses a suitable name for the identifiers (variables and methods), is called the _______

A

​​​​5) Self-Documenting Code

20
Q

Also, giving a proper name for variables and methods would tell the reader of your code clearly.

A

5) Self-Documenting Code