Блок 2- Алгоритмы, структуры данных и программирования

 

1. Correct definition of an array in C++ language

a) float a[10]

2. Loop(cyclic) construction in C++ language is

a) While

3. When formulating a problem statement it is generally established relation between

a) Input and output

4. Initializing of an array element Pascal language

a) b[5]:=3

5. Algorithm represents a sequence of

a) Computational steps transforming input values into output ones

6. Data type used to process symbolic information in Object Pascal Language

a) String

7. Return type of the function with prototype:

*int func(char x, float v, double t);

a) Int

8. Example of the recursive algorithm

a) Find factorial of N natural numbers

9. Example of the recursive algorithm

a) Find Fibonacci sequence

10. Given loop executes at least once

a) Do

11. Container allowing to insert elements to end and extracting elements from end of the list called

a) Stack

12. Special class of containers implementing sorted and associated container and sets

a) Std::set

13. Define the maximum number of comparison in a simple insertion sort algorithm

a) 0(n2)

14. Strlen function of C++ language

a) Located in <string> header file

15. Which function is complete

a) None of the above

16. A valid function call (assuming the function exists)

a) Functi()

17. Properly defined record in a C++ language

a) struct a_struct{int a;}

18. File name is

a) symbolic string length of which depends from certain file system

19. Functions used to check input/output stream condition in C++ language

a) cout(), iostream()

20. In order to read file

a) specify name of the file, open it and read symbols

21. Define value of S

N=2 S=5  
i=1,1..n
S=S+i*i

 

 


 

a) 10

b) 11

22. Functions providing arbitrary access to input/output file system

a) open(), close()

23. The following loop will not work

a) for(i=0; i++)

24. Queue with two ends is

a) deque

25. The queue with each element assigned priority called

a) Priority queue

26. Container allowing to insert elements to end and extract from beginning of the list called

a) queue

27. C++ function used to convert array of ASCII character into array of integers

a) int()

12. Array consists of components having

a) Same type

15. Using the same function name for operation performed by different operators

a) Function overload

6. Which function is complete

a) None of the above

17. C++ language code which accesses to a variable var in a record b

a) b.var

18. Given C++ function prototype:

Int create(const char* filename, int fag); Define a role of create function within file system

a) create function provides access to filename

19. Object predefined in <iostream> header file

a) cin

20. In order to read file

a) specify name of the file, open it and read symbols

24. Functions providing arbitrary access to input/output file system

b) open(), close()

27. Container allowing to insert elements to end and extracting elements from and of the list called

a) stack

29. Container allowing to insert elements to end and extract from beginning of the list called

b) queue

30. Special class of containers implementing bit array in C++ language

a) Std::bitset

2. Loop(cyclic) construction in C++ language is

D)while

3. Stage which is preliminary for the development of an algorithm

C) problem statement, implementation of the algorithm

4. Correct definition of an array in C++ language

A) float a[10]

5. Algorithm represents a sequence of

D) computational steps transforming input values into output ones

6. Symbolic information type describing single literal in Pascal language

B)character

7. Return type of the function with prototype:

*int func(char x,float v,double t);

B)int

8. Example of the recursive algorithm

A)find factorial of N natural numbers

1. Algorithm represents a sequence of

A) computational steps transforming input values into output ones

2. File stream type in C++ language

A) iostream

3. C++ function used to convert array of ASCII character into array of integers

A) Int()

4. Proper declaration of a variable of a record foo

A) foo var