Midterm 1 Flashcards

1
Q

Computer Programming Discipline

A

Is a part of informatics (computer science) which studies methods and techniques for developing, analyzing and applying algorithms and programs that can be used for solving different problems by means of computers.

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

Algorithm

A

Is a set of operations (actions) and order of there execution (step by step procedure) for solving a given problem.

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

Forms of algorithm representation (description)

A

1) natural form - by using human and other languages:
2) graphical form – by using flowchart (a diagram consists of special symbols of operations linked between them);
3) a pseudo-code – by using special rules for operations
description and a computer program – by using programming languages.

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

Graphical symbols of operations: Starting operation

A

{ - opening brace, (start)

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

Graphical symbols of operations: Ending operation

A

return statement;
} - closing brace
(stop)

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

Graphical symbols of operations: Input operation

A

scanf( );
/__/

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

Graphical symbols of operations: Output operation

A

printf( );
|~|

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

Graphical symbols of operations: Calculation operation or
Assignment operation

A

assignment statement: variable = expression;
|__|

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

Graphical symbols of operations: Decision (conditional)
operation

A

if(condition){statements Yes;}
else {statements No;}
<>

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

Graphical symbols of operations: Precondition loop operation

A

for(ex.1; ex.2; ex.3)
{statements of loop body;}

<_>
</_>

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

Graphical symbols of operations: Subprogram call operation

A

subprogram call statement;
||__||

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

Parts of any program written in C language:

A

a) preprocessor directives;
b) one or more texts of functions (subprograms);
c) declarations situated out of the function bodies;

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

Structure of a function in C language:

A

a) header line of the function;
b) body of the function which is situated between opening and closing braces.

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

format specifier integer

A

%d

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

format specifier float

A

%f

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

format specifier double float

A

%lf

17
Q

format specifier char

A

%c

18
Q

switch statement

A

switch (age) {
case 1: printf(“You’re one.”); break;
case 2: printf(“You’re two.”); break;
case 3: printf(“You’re three.”);
case 4: printf(“You’re three or four.”); break;
default: printf(“You’re not 1,2,3 or 4!”);
}

19
Q

break

A

is used to jump out of a switch or loop;

20
Q

continue

A

breaks one iteration (in the loop) and continues with the next one;

21
Q

goto

A

is used to transfer the program control to a predefined label;