Жарас Мергазы
Quiz by , created more than 1 year ago

sdp4 Quiz on SDP4 by Zharas, created by Жарас Мергазы on 25/05/2017.

1068
13
0
Жарас Мергазы
Created by Жарас Мергазы almost 7 years ago
Close

SDP4 by Zharas

Question 1 of 176

1

1. With what option we can display warnings while compile with command "gcc"?

Select one of the following:

  • -o

  • -Wall

  • -I

  • -print-sysroot

Explanation

Question 2 of 176

1

What number of classes (*.java) has project-01?

Select one of the following:

  • 3

  • 5

  • 2

  • 4

Explanation

Question 3 of 176

1

What number of source code files has ex-05 in project-01?

Select one of the following:

  • 3

  • 2

  • 4

  • 5

Explanation

Question 4 of 176

1

What number wasn’t tested in TestMainline class in prject01?

Select one of the following:

  • 4

  • 2

  • 81

  • 64

  • 91

Explanation

Question 5 of 176

1

In exercises 11-13 nodes are stored?

Select one of the following:

  • Position and salary

  • Name and study year

  • Position and birth year

  • Name and age

Explanation

Question 6 of 176

1

Ex-16. what is size of matrix in given large.txt?

Select one of the following:

  • 60

  • 50

  • 80

  • 30

Explanation

Question 7 of 176

1

What is range of verify numbers for square root in proj2?

Select one of the following:

  • 2 to 1000

  • 2 to 100

  • 2 to 100000

  • 2 to 10000

Explanation

Question 8 of 176

1

What are files in C portion of proj2?

Select one of the following:

  • Sqr.c sqr.h unumber.c unumber.h

  • Makefile, sqr.c, unumber.c, unumber.h

  • Makefile, sqr.c, sqr.h, unumber.c

  • Makefile , sqr.c , unumber.c, squareRootTwo.text

Explanation

Question 9 of 176

1

Ex-10 what does UNumber structure include ?

Select one or more of the following:

  • Value

  • Range

  • Decimal point

  • Decimal power

  • Count

  • Sign

Explanation

Question 10 of 176

1

What number of errors has code in Exercise-03?

Select one of the following:

  • 3

  • 1

  • 4

  • 2

Explanation

Question 11 of 176

1

2. "pdsa" what does it mean? (Please select the best answer)

Select one of the following:

  • name of created folder in excercise 01

  • abbreviation of SDP-4 course name

  • performance, data storage and algorithms

  • special folder where all our deliverables are stored

Explanation

Question 12 of 176

1

What does Unix command - ls?

Select one of the following:

  • refers to your home directory

  • lists the contents of a directory

  • refers to the current directory

  • displays the path of the current directory

Explanation

Question 13 of 176

1

. On a 32bit system CLOCKS_PER_SEC equals

Select one of the following:

  • 100000

  • 1000000

  • 1000000000000

  • 1000000000

  • 10000000

Explanation

Question 14 of 176

1

What should we do to remove executable and the intermediate build files?

Select one of the following:

  • rm *

  • make clean

  • make del

  • . make rm

Explanation

Question 15 of 176

1

What main benefit gives us "makefile" in doing exercises? (Please select the best answer)

Select one of the following:

  • . shows us more detailed information about errors

  • saves our time while we debugging program code

  • quick compile in short command - 'make'

  • enriches our compile options

Explanation

Question 16 of 176

1

. Project 01 ends on what number of exercises?

Select one of the following:

  • 8

  • 7

  • 5

  • 6

Explanation

Question 17 of 176

1

What does Unix command - './file'?

Select one of the following:

  • . refers to a directory called 'file'

  • execute first file in current directory

  • compile called 'file'

  • refers to an entity called 'file' in the current directory

Explanation

Question 18 of 176

1

The default name of the compiled program is

Select one of the following:

  • d.out

  • a.out

  • c.out

  • the same name as source file, but with .out

Explanation

Question 19 of 176

1

2. Ex-09. What was the number of values in data.txt?

Select one of the following:

  • 300

  • 25

  • 200

  • 10

  • 500

Explanation

Question 20 of 176

1

3. What number of array's size is large enough in ex-15?

Select one of the following:

  • ~ 1 000

  • ~ 10

  • ~ 1 000 000

  • ~ 100

Explanation

Question 21 of 176

1

4. Type macros bool is contained in library:

Select one of the following:

  • ~ stdlib.h

  • ~ time.h

  • ~ stdio.h

  • ~ stdbool.h

Explanation

Question 22 of 176

1

5. What number of Exercises in Project-01?

Select one of the following:

  • 4

  • 3

  • 2

  • 5

Explanation

Question 23 of 176

1

To get result time in miliseconds (in Java program) what should we do in Ex05 with calculated time?
To get result time in miliseconds (in Java program) what should we do in Ex05?

Select one of the following:

  • ~ / 100

  • ~* 10 000

  • ~ * 1 000

  • ~ * 100 000

  • ~ / 1 000 000

Explanation

Question 24 of 176

1

7. In exercise-04 we used 1E+10 to...

Select one of the following:

  • to put limit of numbers after point

  • establish the limit for ending the loop

  • setup the limit number of loop iterations

  • establish the maximum of delta between guess and new_guess numbers

Explanation

Question 25 of 176

1

8. In exercise-04 for loop we used 2nd limit for ending, and limit was what number of cycles?

Select one of the following:

  • 1+E10

  • 10

  • 20

  • 100

  • 200

  • 1000

  • 1000000

Explanation

Question 26 of 176

1

name: "PDSA" what does it mean?
"PDSA" what does it mean? (Please select the best answer){

Select one of the following:

  • performance, data service and algorithms

  • performance, digital service and algorithms

  • performance, data structures and algorithms

  • performance, digital structures and algorithms

Explanation

Question 27 of 176

1

name: What does Unix command - mkdir ?
What does Unix command - mkdir ?{

Select one of the following:

  • displays the path of the current directory

  • refers to the current directory

  • lists the contents of a directory

  • creates directory

Explanation

Question 28 of 176

1

How to delete files in Unix terminal?
How to try to delete some files in Unix terminal?{

Select one of the following:

  • with command - del

  • with command - mv

  • with command - make clean

  • with command - cp

Explanation

Question 29 of 176

1

The default name with option "-o ex02" of the compiled program is:
The name of compiled file with option "-o ex02.out" is\:

Select one of the following:

  • a.out

  • ex02

  • ex02.out

  • ex02.c

Explanation

Question 30 of 176

1

What does "makefile" include? (2 right answers){

Select one or more of the following:

  • %50% dependencies

  • %50% targets

  • %50% text of warning messages

  • %50% descriptions

Explanation

Question 31 of 176

1

What should we do to remove executable, intermediate build files and all others?
What should we do to delete all files in local directory (i.e. executable and intermediate build files)?

Select one of the following:

  • make rm

  • rm *

  • rm clean

  • make del

Explanation

Question 32 of 176

1

What Unix command should we use in order to refresh modification time of file?
Exercise-03. What Unix command should we use in order to refresh modification time of file?

Select one of the following:

  • modify

  • make

  • touch

  • make update

Explanation

Question 33 of 176

1

What does in Unix command "./" the dot "." specify?

Select one of the following:

  • local file

  • entity of excutable file

  • current directory

  • excute only compiled files

Explanation

Question 34 of 176

1

In Unix path command "~/" tilde "~" specify?

Select one of the following:

  • root directory

  • home directory

  • current directory

  • containing directory

Explanation

Question 35 of 176

1

What does Unix command - "mkdir ../dom" ?

Select one of the following:

  • creates directory "dom" in containing directory

  • creates directory "dom" in home directory

  • creates directory "dom" in local directory

  • creates directory "dom" in current directory

Explanation

Question 36 of 176

1

The default name with option "-o task_01" of the compiled program is:
The name of compiled file with option "-o task_01" is

Select one of the following:

  • a.out

  • task_01

  • task_01.out

  • task_01.c

Explanation

Question 37 of 176

1

With what option we can display warnings while compile with command "gcc"?{

Select one of the following:

  • -o

  • -Wall

  • -I

  • -print-sysroot

Explanation

Question 38 of 176

1

What does file extension have source code file in C

Select one of the following:

  • *.o

  • *.h

  • *.c

  • *.f

Explanation

Question 39 of 176

1

How to try to delete something in Unix terminal?

Select one of the following:

  • with command - del

  • with command - mv

  • with command - mkdir

  • with command - rmdir

Explanation

Question 40 of 176

1

What does Unix command - '../make_file' ?

Select one of the following:

  • compile file with name 'make_file'

  • try to compile and show warnings

  • refers to an entity called 'make_file' in the current directory

  • runs excutable file 'make_file' in the containing directory

Explanation

Question 41 of 176

1

How we calculate new_guess number in our Newton's method?

Select one of the following:

  • new_guess \~ value / 2;

  • new_guess \~ (old_guess + value) / 2.0;

  • new_guess \~ (old_guess + value / old_guess) / 2.0;

  • new_guess \~ (old_guess + value / 2) / 2;

Explanation

Question 42 of 176

1

Exercise-03. With Unix command "make" we can use targets at command promt, please select them: (2 right answers)

Select one or more of the following:

  • ~%50% clean

  • ~%50% all

  • ~%50% touch

  • ~%50% makefile

Explanation

Question 43 of 176

1

What does in Unix command "../" dots ".." specify?

Select one of the following:

  • root directory

  • home directory

  • current directory

  • containing directory

Explanation

Question 44 of 176

1

"UPM" what does it mean in Project-01?

Select one of the following:

  • Universal Precision Math

  • Unlimited Precision Model

  • Universal Precision Model

  • Universal Processor Math

  • Unlimited Precision Math

Explanation

Question 45 of 176

1

Exercise-05. How to right look in third section of man pages?

Select one of the following:

  • man clock 3

  • man -3 clock

  • man ./3 clock

  • man 3 clock

Explanation

Question 46 of 176

1

What header file (C library) we should insert in code for using "clock" function?

Select one of the following:

  • time.h

  • nanoTime.h

  • clocks.h

  • clock.h

Explanation

Question 47 of 176

1

What was search algorithm used in exercise-8?

Select one of the following:

  • recursive search

  • binary search

  • insertion

  • selection

Explanation

Question 48 of 176

1

We have C library calc.h and calc.o, what we have to do next for using this library?

Select one of the following:

  • while compile just add in console command calc.h at the end

  • modify make file by adding new object in it

  • write in source code define calc.h

  • write in source code include calc.o

Explanation

Question 49 of 176

1

What was sort algorithm used in exercise-7?

Select one of the following:

  • bubble

  • insertion

  • selection

  • merge

Explanation

Question 50 of 176

1

For what did we use conditional compilation in exercise-8?

Select one of the following:

  • for calling library

  • for debugging information

  • for sorting array of doubles

  • for extra output

Explanation

Question 51 of 176

1

What have we learned in exercise-9 for minimizing errors in code?

Select one of the following:

  • using bubble sort

  • using constants

  • using libraries

  • using pointers

Explanation

Question 52 of 176

1

What is period of DEBUG in exercise-9?

Select one of the following:

  • 0 - 2

  • 0 - 3

  • 0 - 4

  • 0 - 5

Explanation

Question 53 of 176

1

Ex-09. Step-12: In which function is the problem?
Ex-09. Step-12: In which function is the problem with ASCENDING and DESCENDING ?

Select one of the following:

  • bubble_sort

  • binary_search

  • main

  • insertion_sort

Explanation

Question 54 of 176

1

Ex-08. For #ifdef/#endif pair is right: (Please select the best answer)

Select one of the following:

  • checks to see if a constant is not defined

  • checks to see if a constant is defined

  • checks to see if a CFLAG is not defined

  • checks to see if a CFLAG is defined

Explanation

Question 55 of 176

1

Ex-08. With what option we can define constant as a parameter to the compiler (for conditional compilation)?

Select one of the following:

  • gcc -Wall -I. -DDEBUG

  • gcc -Wall -I. -DEBUG

  • gcc -Wall -I. -DCFLAGS

  • gcc -Wall -I. -CFLAGS

Explanation

Question 56 of 176

1

Function malloc is contained in library:

Select one of the following:

  • stdlib.h

  • time.h

  • stdio.h

  • stdbool.h

Explanation

Question 57 of 176

1

Ex-10. What does UNumber structure include? (3 right answers){

Select one or more of the following:

  • sign

  • decimal power

  • value

  • range

  • decimal point

  • count

Explanation

Question 58 of 176

1

Ex-13. Is it right for "Memory tracing"? Memory tracking simply involves counting the number of times malloc and free are called

Select one of the following:

  • True
  • False

Explanation

Question 59 of 176

1

Ex-13. With what format in function printf can program display the values of pointers?

Select one of the following:

  • %f

  • %v

  • %s

  • %p

Explanation

Question 60 of 176

1

What is result of "5" + "2" in ASCII codes?

Select one of the following:

  • 7

  • 103

  • 52

  • 155

Explanation

Question 61 of 176

1

What is false for Single Linked List?

Select one of the following:

  • has head and tail nodes

  • has pointer for previous node

  • we can move node by node only to one direction

  • we can insert node

Explanation

Question 62 of 176

1

What is false for Double Linked List?

Select one of the following:

  • has head and tail nodes

  • has pointer for previous node

  • we can move node by node only to one direction

  • we can insert node

Explanation

Question 63 of 176

1

With what function we allocate memory?

Select one of the following:

  • givmem

  • free

  • malloc

  • alloc

Explanation

Question 64 of 176

1

Exercise-14. You can build Java programs at the command line using command:

Select one of the following:

  • make

  • gcc -Wall

  • javac

  • java

Explanation

Question 65 of 176

1

What is result of "8" + "7" in ASCII codes?

Select one of the following:

  • 15

  • 111

  • 87

  • 159

Explanation

Question 66 of 176

1

Exercise-14. You can run Java programs at the command line using command:

Select one of the following:

  • .\

  • gcc -Wall

  • javac

  • java

Explanation

Question 67 of 176

1

With what function we release memory?

Select one of the following:

  • calloc

  • free

  • malloc

  • alloc

Explanation

Question 68 of 176

1

What is result of "8" + "3" in ASCII codes?

Select one of the following:

  • 11

  • 107

  • 83

  • 159

Explanation

Question 69 of 176

1

What is true for Single Linked List?

Select one or more of the following:

  • has head and tail nodes

  • easy display list in any direction

  • node has two pointers

  • we can move node by node only to one direction

  • we can remove node

Explanation

Question 70 of 176

1

What is true for Double Linked List?

Select one or more of the following:

  • has head node and not tail node

  • has pointer for previous node

  • we can move node by node to any direction

  • every node has pointer to next node which is always tail

  • we can remove node

Explanation

Question 71 of 176

1

Ex-16. Conway Game of Life. Will this colony "111" of three live cells disappear on next iteration?

Select one of the following:

  • True
  • False

Explanation

Question 72 of 176

1

Pointer arithmetric formula for 2-dim arrays in C?

Select one of the following:

  • p + (num_cols * row) + col

  • p * (num_cols * row) + col

  • p + (num_cols + row) * col

Explanation

Question 73 of 176

1

CONWAY GAME OF LIFE. Is this rule true?
CONWAY GAME OF LIFE. Is this rule true? Any live cell with fewer than two live neighbors dies

Select one of the following:

  • True
  • False

Explanation

Question 74 of 176

1

CONWAY GAME OF LIFE. Is this rule true? Any live cell with two or three live neighbors dies on to the next generation

Select one of the following:

  • True
  • False

Explanation

Question 75 of 176

1

Ex-16. Conway Game of Life. What colony of cells (size: 3x3 written in one line like: 111 101 111) will die on next iteration?

Select one of the following:

  • 111 111 000

  • 110 110 000

  • 000 101 101

  • 001 100 100

Explanation

Question 76 of 176

1

Ex-16. Conway Game of Life. What colony of cells (size: 3x3 written in one line like: 111 101 111) will die on next iteration?

Select one of the following:

  • 001 110 000

  • 110 110 000

  • 100 000 001

  • 001 100 100

Explanation

Question 77 of 176

1

CONWAY GAME OF LIFE. Is this rule true? Any live cell with more than three live neighbors dies, as if by overcrowding

Select one of the following:

  • True
  • False

Explanation

Question 78 of 176

1

Ex-16. Conway Game of Life. What colony of cells will survive on next iteration?

Select one of the following:

  • 111

  • 10101

  • 11011

  • 101

Explanation

Question 79 of 176

1

Ex-16. Conway Game of Life. What colony of cells (size: 3x3 written in one line like: 111 101 111) will die on next iteration?

Select one of the following:

  • 000 111 000

  • 110 110 000

  • 110 100 000

  • 101 101 000

Explanation

Question 80 of 176

1

What is purpose of argument -s in Project-02?

Select one of the following:

  • specifies the number of value which we should input to sqr function

  • specifies the number of significant digits

  • specifies the name of the comparison input file

  • specifies the name of the input file with test values

Explanation

Question 81 of 176

1

What does Lex do?

Select one of the following:

  • recognizes whether an input string is an instance of a specified pattern

  • generates code for a lexical analyzer based on definitions in an input file

  • recognizes tokens in a stream of characters

  • generates definitions for a lexical analyzer based on patterns

Explanation

Question 82 of 176

1

What does the following regular expression match?[-+]?[[\:digit\:]]+/[[\:digit\:]]+</p>

Select one of the following:

  • <p>+4/5</p>

  • <p>+2/3+</p>

  • <p>-+2/6</p>

  • <p>-4/5+</p>

Explanation

Question 83 of 176

1

What does the following regular expression match?[-+]?[[\:digit\:]]+</p>

Select one of the following:

  • ~<p>75</p>

  • ~<p>+23a</p>

  • ~<p>-26g</p>

  • ~<p>?32f</p>

Explanation

Question 84 of 176

1

What is FSM?

Select one of the following:

  • Finite System Machine

  • Finite Service Machine

  • Final System Model

  • Finite State Machine

Explanation

Question 85 of 176

1

Which string is right for FSM with model\: ( 0 ) \~ a-z \~ ( 1 ) \~ 0-9 \~ ( 2 ) \~ @ \~ ( 3 ) \~ a-z \~ (( 4 ))

Select one of the following:

  • 012@34

  • tt@r

  • 0a12@a

  • f0@x

Explanation

Question 86 of 176

1

The Lex program has existed since the...

Select one of the following:

  • 1960

  • 1980

  • 1970

  • 1990

Explanation

Question 87 of 176

1

Select a regular expression that matches : 10k or 10K

Select one of the following:

  • ~[[:digit:]]+[kK]

  • ~[[:digit:]]+[kK]?

  • ~[[:digit:]][kK]*

  • ~[[:digit:]][k]

Explanation

Question 88 of 176

1

Select a regular expression that matches : Strings that contain an optional minus or plus followed by zero or more alphabetic characters

Select one of the following:

  • ~[-+][[:alnum:]]*

  • ~[-+][[:alpha:]]*

  • ~[-+][[:alnum:]]+

  • ~[-+]?[[:alpha:]]+

  • ~[-+]?[[:alpha:]]*

Explanation

Question 89 of 176

1

What do the following regular expressions match [-+][[:digit:]]*?

Select one of the following:

  • Strings that contain a required minus or a plus followed by zero or more digits

  • Strings that contain a required minus or a plus followed by one or more digits

  • Strings that contain an optional minus or plus followed by one or more digits

  • Strings that contain an optional minus or plus followed by zero or more digits.

Explanation

Question 90 of 176

1

What FSM recognizes this string token? "2*2~4"

Select one of the following:

  • ( 0 ) --- 0-9 --- ( 1 ) --- * --- ( 2 ) --- 0-9 --- ( 3 ) --- \~ --- ( 4 ) --- 0-9 --- (( 5 ))

  • ( 0 ) --- 0-9 --- ( 1 ) --- a-z --- ( 2 ) --- 0-9 --- ( 3 ) --- a-z --- ( 4 ) --- 0-9 --- (( 5 ))

  • ( 0 ) --- 0-9 --- ( 1 ) --- a-z --- ( 2 ) --- 0-9 --- ( 3 ) --- \~ --- ( 4 ) --- 0-9 --- (( 5 ))

  • ( 0 ) --- 0-9 --- ( 1 ) --- * --- ( 2 ) --- 0-9 --- ( 3 ) --- a-z --- ( 4 ) --- 0-9 --- (( 5 ))

Explanation

Question 91 of 176

1

Select a regular expression that matches : Strings that contain a required minus or a plus followed by zero or more alpha-numeric characters

Select one of the following:

  • [-+][[:alnum:]]*

  • [-+]?[[:alpha:]]*

  • [-+][[:alnum:]]+

  • [-+]?[[:digit:]]+

  • [-+][[:alpha:]]+

Explanation

Question 92 of 176

1

What does the following regular expression match?[-+]?[[\:digit\:]]+</p>

Select one of the following:

  • <p>23</p>

  • <p>+45</p>

  • <p>26g+</p>

  • <p>?32f</p>

Explanation

Question 93 of 176

1

What does the following regular expression match?[-+]?[[\:alnum\:]]+/[^$]+</p>

Select one of the following:

  • <p>gf26/dsfeg</p>

  • <p>gf23/dsfeg$</p>

  • <p>-123g/ffef$</p>

  • <p>?123f/ffef</p>

Explanation

Question 94 of 176

1

9. What does the following regular expression match? [-+]?[[\:alnum\:]]+/[^$]+

Select one of the following:

  • <p>abs123/ffef</p>

  • <p>abs123/ffef$</p>

  • <p>-26g/dsfeg$</p>

  • <p>?32f/wrw$</p>

Explanation

Question 95 of 176

1

10. What does this Unix commad\: lex baseline.lex?

Select one of the following:

  • generate a definition file

  • run the resulting program

  • generate a source code file called lex.yy.c

  • compile the generated source file, resulting executable is a.out

Explanation

Question 96 of 176

1

What do the following regular expressions match "iitu[!]?" ?

Select one of the following:

  • Lines that contain the letter sequence i, i, t, u and probably !.

  • Lines that contain the letter sequence i, t, u, ! and ?.

  • Lines that contain the letter sequence ii, t, u, and !.

  • Lines that contain the letter sequence ii, t, u and probably !.

Explanation

Question 97 of 176

1

What FSM recognizes this string token? "d7@r"

Select one of the following:

  • ( 0 ) \~ a-z \~ ( 1 ) \~ a-z \~ ( 2 ) \~ @ \~ ( 3 ) \~ a-z \~ (( 4 ))

  • ( 0 ) \~ a-z \~ ( 1 ) \~ 0-9 \~ ( 2 ) \~ @ \~ ( 3 ) \~ a-z \~ ( 4 ) \~ a-z \~ (( 5 ))

  • ( 0 ) \~ a-z \~ ( 1 ) \~ 0-9 \~ ( 2 ) \~ 0-9 \~ ( 3 ) \~ @ \~ ( 4 ) \~ a-z \~ (( 5 ))

  • ( 0 ) \~ a-z \~ ( 1 ) \~ 0-9 \~ ( 2 ) \~ @ \~ ( 3 ) \~ a-z \~ (( 4 ))

Explanation

Question 98 of 176

1

For calling FSM program we need:

Select one or more of the following:

  • token file

  • definition file

  • input file

  • note file

Explanation

Question 99 of 176

1

In UNIX console "ls *.[ch]" command what will do?

Select one of the following:

  • list all files in the current directory that end with .ch

  • list all files in the current directory that end with .[ch]

  • list all files in the current directory that end with .c or .h

  • list all files in the current directory that end with .ch, .c or .h

Explanation

Question 100 of 176

1

What FSM recognizes this string token? "apt-7,bld#2"

Select one of the following:

  • ( 0 ) \~ a-z \~ ( 1 ) \~ a-z \~ ( 2 ) \~ @ \~ ( 3 ) \~ a-z \~ (( 4 ))

  • ( 0 ) \~ a-z \~ ( 1 ) \~ 0-9 \~ ( 2 ) \~ @ \~ ( 3 ) \~ a-z \~ (( 4 ))

  • ( 0 ) \~ apt \~ ( 1 ) \~ - \~ ( 2 ) \~ 0-9 \~ ( 3 ) \~ ,bld\# \~ ( 4 ) \~ 0-9 \~ (( 5 ))

  • ( 0 ) \~ a-z \~ ( 1 ) \~ - \~ ( 2 ) \~ 0-9 \~ ( 3 ) \~ , \~ ( 4 ) \~ a-z \~ ( 5 ) \~ \# \~ ( 6 ) \~ 0-9 \~ (( 7 ))

  • ( 0 ) \~ apt- \~ ( 1 ) \~ 0-9 \~ ( 2 ) \~ , \~ ( 3 ) \~ bld \~ ( 4 ) \~ \#0-9 \~ (( 5 ))

Explanation

Question 101 of 176

1

For calling FSM program we need

Select one of the following:

  • token file

  • file with definitions

  • output file

  • note file

Explanation

Question 102 of 176

1

Ex-16. Conway Game of Life. What colony of cells will survive on next iteration?
Conway Game of Life. What colony of cells will die on next iteration?{

Select one of the following:

  • 11100

  • 10101

  • 11011

  • 00111

Explanation

Question 103 of 176

1

Ex1-4. The name of compiled file with option "-o wall2" is

Select one of the following:

  • a.out

  • wall2

  • wall2.out

  • wall2.o

Explanation

Question 104 of 176

1

Ex-22. Java tokenizer program recognizes... (2 right answers)

Select one or more of the following:

  • Unumber

  • number

  • string tokens

  • char tokens

Explanation

Question 105 of 176

1

Ex-23 program was enhaced to skip: (2 right answers)

Select one or more of the following:

  • octal numbers

  • comments

  • white space

  • Unknown tokens

Explanation

Question 106 of 176

1

Ex-25 program was enhaced to recognize: (2 right answers)

Select one or more of the following:

  • special characters

  • reserved words

  • operators

  • comments

Explanation

Question 107 of 176

1

In Ex-22 we don't recognize fully those tokens : (2 right answers)

Select one or more of the following:

  • number

  • UNKNOWN

  • octal

  • string

Explanation

Question 108 of 176

1

Character "f" represents command

Select one of the following:

  • hexadecimal digit

  • octal digit

  • final state

  • any digit

Explanation

Question 109 of 176

1

Character "h" represents command

Select one of the following:

  • hexadecimal digit

  • octal digit

  • final state

  • any digit

Explanation

Question 110 of 176

1

Character "d" represents command

Select one of the following:

  • hexadecimal digit

  • octal digit

  • nonzero digit

  • any digit

Explanation

Question 111 of 176

1

Character "z" represents command

Select one of the following:

  • hexadecimal digit

  • octal digit

  • nonzero digit

  • any digit

Explanation

Question 112 of 176

1

Character "o" represents command:

Select one of the following:

  • hexadecimal digit

  • octal digit

  • nonzero digit

  • any digit

Explanation

Question 113 of 176

1

Character "p" represents command:

Select one of the following:

  • specific character

  • pointer

  • final state

  • printable ascii

Explanation

Question 114 of 176

1

Character "c" represents command

Select one of the following:

  • specific character

  • pointer

  • final state

  • printable ascii

Explanation

Question 115 of 176

1

Character "a" represents command:

Select one of the following:

  • a specific character

  • an alpha character

  • an any character

  • a printable ascii

Explanation

Question 116 of 176

1

For those characters that are not recognized by the FSM, all transitions for the row are set to...

Select one of the following:

  • 0

  • -1

  • f

  • *

Explanation

Question 117 of 176

1

Ex-25. What are words reserved? (2 right answers)

Select one or more of the following:

  • GREATER_THAN

  • AUTO

  • STATIC

  • EQUAL

Explanation

Question 118 of 176

1

Ex-25. What are words NOT reserved, they are operators? (2 right answers)

Select one or more of the following:

  • REGISTER

  • NOT

  • MINUS_MINUS

  • SWITCH

Explanation

Question 119 of 176

1

Ex-25. nonzero digit from: "0 z 1\n". Task please write your structure for printable characters (without double quotes)

Select one of the following:

  • 1 p 1\n

  • 1 p \1n

  • 1 1 p\n

Explanation

Question 120 of 176

1

Ex-29. A naive binary search tree is...

Select one of the following:

  • balanced

  • full

  • general

  • complete

  • perfect

Explanation

Question 121 of 176

1

Ex-30. What is right for relative search time for trees with random and sorted data?(2 right answers)

Select one or more of the following:

  • as tree height decreases, search time also increases

  • search time is closely related to the height of the tree

  • as tree height increases, search time also increases

Explanation

Question 122 of 176

1

Ex-31. AVL tree is...

Select one of the following:

  • naive binary tree

  • binary search tree

  • full binary tree

  • balanced binary tree

Explanation

Question 123 of 176

1

ex-29: the program is missing code:

Select one or more of the following:

  • adding notes

  • getting nodes.

  • Inserting nodes

  • Deleting nodes

Explanation

Question 124 of 176

1

. An AVL tree is...{

Select one of the following:

  • a self-completing binary search tree

  • a naive binary search tree

  • a self-routed binary search tree

  • a self-balancing binary search tree

Explanation

Question 125 of 176

1

Ex-31. The height of an AVL tree is most

Select one of the following:

  • 1.44*log2(n)

  • 3.14*log2(n+2)-1

  • log2(n+2)-1

  • 1.44*log2(n+2)-1

Explanation

Question 126 of 176

1

Ex-31. The height of a tree of one billion nodes will be: (Please type just one any number)

Select one or more of the following:

  • 42

  • 43

  • 44

  • 45

Explanation

Question 127 of 176

1

What are methods we have added in ChainHashTable.java?(2 right answers)

Select one or more of the following:

  • insert()

  • get()

  • hash()

  • del()

Explanation

Question 128 of 176

1

Ex-32. What are advantages have Hash table?(2 right answers)

Select one or more of the following:

  • perfomance is slower than that of a binary tree

  • perfomance is faster than that of a binary tree

  • memory allocation is smaller than a comparable binary tree node

  • memory allocation is larger than a comparable binary tree node

Explanation

Question 129 of 176

1

Ex-33. With what 2 values you can change setup of Experiment.java?(2 right answers)

Select one or more of the following:

  • hashCode

  • keyRadix

  • hashPrime

  • avgKey

Explanation

Question 130 of 176

1

Lec. Binary tree is:(2 right answers)

Select one or more of the following:

  • left tree

  • a root

  • left subtree

  • right tree

Explanation

Question 131 of 176

1

Lec. Binary tree's properties:(2 right answers)

Select one or more of the following:

  • average depth of left subtree

  • max of leaves

  • max of nodes

  • average depth of leaves

Explanation

Question 132 of 176

1

Lec. Binary Search Tree's properties: (2 right answers)

Select one or more of the following:

  • each node has more 2 children

  • left node smaller than his root node

  • right node lager than his root node

  • each node has less 2 children

Explanation

Question 133 of 176

1

Lec. Hash Tables:(2 right answers)

Select one or more of the following:

  • Large-scale distributed systems

  • Effective way of implementing dictionaries

  • Generalization of ordinary arrays

  • Memory-management tables in operating systems

Explanation

Question 134 of 176

1

Ex-37. In exercise the enhanced program has been modified: (3 right answers)

Select one or more of the following:

  • Build expression trees for Boolean expressions

  • to recognize Boolean expressions

  • evaluate boolean expressions

  • to recognize arithmetic expressions

  • build expression trees for arithmetic expressions

Explanation

Question 135 of 176

1

Many languages allow overloading of operators. The is true or false in java?

Select one of the following:

  • True
  • False

Explanation

Question 136 of 176

1

Ex-37. For example, the "+" operator does different things depending on what its operands are: (3 right answers

Select one or more of the following:

  • If the operands are doubles, a floating-point addition is performed

  • If the operands are integers, an integer addition is performed

  • If the operands are strings, a string concatenation is performed

  • if the operands are strings, a floating-point addition is performed

  • If the operands are integers, a string concatenation is performed

Explanation

Question 137 of 176

1

Ex-37. In exercise we can have 3 classes of operators: (3 right answers)

Select one or more of the following:

  • Arithmetic

  • relational

  • logical

  • logic

  • relation

Explanation

Question 138 of 176

1

Ex-34. The program prompts the user for commands, then executes the commands. Unrecognized command is

Select one of the following:

  • Insert

  • Quit

  • Dump

  • Set

  • Print

  • Reset

Explanation

Question 139 of 176

1

Ex-35. Which activity was NOT performed?

Select one of the following:

  • Collect data by running the program

  • Collect data by checking the program

  • Collect data by executing the program

Explanation

Question 140 of 176

1

Ex-30. What are varying values for variables have used?(2 right answers)

Select one or more of the following:

  • Step

  • Maxsize

  • MinSize

  • Level

Explanation

Question 141 of 176

1

Ex-32. What are methods we have added in ChainHashTable.java?(2 right answers)

Select one or more of the following:

  • Add()

  • hashtabletostring()

  • setIn()

  • gettable()

Explanation

Question 142 of 176

1

Ex-32. What are advantages have BST?(2 right answers)

Select one or more of the following:

  • Finding closest lower and greater elements is faster than a hash table

  • All operations are guaranted to work in O(login) time

  • Performance much faster that that of a hashtable()

  • Memory allocation is lower than a hash table

Explanation

Question 143 of 176

1

Ex-41. When the linked list is better?

Select one of the following:

  • The number of items is very large

  • The number of items Is small

Explanation

Question 144 of 176

1

Ex-41. When the tree is better?

Select one of the following:

  • The number of items Is small

  • The number of items is very large

Explanation

Question 145 of 176

1

Ex-41. What are advatanges have a double linked list and linear search?

Select one or more of the following:

  • fast search

  • small code

  • simple algorithm

  • more complex code

Explanation

Question 146 of 176

1

In project 05 what 2 types of algorithms are used?

Select one or more of the following:

  • BBT AWL

  • BST AVL

  • Hash Table

  • Hash Tree

Explanation

Question 147 of 176

1

Project 5 length?

Select one of the following:

  • 5

  • 4

  • 3

  • 6

Explanation

Question 148 of 176

1

Project 5 height

Select one of the following:

  • 12

  • 14

  • 16

  • 15

Explanation

Question 149 of 176

1

Project 5: the static analysis of the hash table should include:

Select one or more of the following:

  • The longest length chain

  • Average length of non-zero length chain

  • The shortest length chain

  • Average length of non-zero height chain

Explanation

Question 150 of 176

1

Ex-42. what is whatchpoint?

Select one of the following:

  • Changing variable

  • Creating variable

  • Writing varibale

  • Changing value

Explanation

Question 151 of 176

1

Project 5. for the last two solutions you will need to?

Select one or more of the following:

  • Minimal node in tree

  • Tree height

  • Avl expected tree limit

  • Average length of non-zero chains

Explanation

Question 152 of 176

1

Project 5 four versions:

Select one of the following:

  • arraylist, array, avl BST, hash table

  • arraylist, value, avl BST, hash table

  • arraylist, array, variable, hash table

Explanation

Question 153 of 176

1

Project 5 words?

Select one of the following:

  • 250 000 words

  • 50 000 words

  • 100 000 words

  • 1000 000 words

Explanation

Question 154 of 176

1

Project 5 found at first time:

Select one of the following:

  • 25000

  • 50000

  • 100000

  • 250000

Explanation

Question 155 of 176

1

Project 5 didn’t find at first time:

Select one of the following:

  • 25000

  • 50000

  • 250000

  • 100000

Explanation

Question 156 of 176

1

Write a regular expression that matches the writing: d23, D23 or 23).
For example for numbers: -4, 3 or +5; right regular expression is written like that:[+-]?[[:digit:]]+

Select one or more of the following:

  • [dD]?[[:digit:]]+

  • [Dd]?[[:digit:]]+

  • [Dd]?[[:digit:]]

Explanation

Question 157 of 176

1

Write a regular expression that matches the exponent part of a floating point
number written in scientific notation (e.g. e10 or E10). Sample for -4, 3 or +5 answer is [+-]?[[:digit:]]+{

Select one or more of the following:

  • [eE][[:digit:]]+

  • [eE][[:digits:]]+

  • [dD][[:digit:]]+

Explanation

Question 158 of 176

1

Write a regular expression that matches the writing number of apartment (e.g. n23 or N23).
For example for numbers: -4, 3 or +5; right regular expression is written like that:[+-]?[[:digit:]]+{

Select one of the following:

  • [nN][[:digit:]]+

  • [nN][[:digit:]]

  • [eE][[:digit:]]+

  • [dD][[:digit:]]+

Explanation

Question 159 of 176

1

Write a regular expression that matches the writing number with pi (e.g. 2pi, -33pi or +5pi).
For example for numbers: -4, 3 or +5; right regular expression is written like that:[+-]?[[:digit:]]+{

Select one or more of the following:

  • [+-]?[[:digit:]]+[[:alpha:]]+

  • [+-]?[[:digit:]]+[pi]

  • [+-]?[[:digit::]]+[pi]

Explanation

Question 160 of 176

1

Ex-40. Why might using a profiler on your code be useful? (2 right answers)

Select one or more of the following:

  • A profiler can be used to guide efforts to improve a program.

  • For example, measuring timing information can help guide efforts to improve performance.

  • A profiler cannot be used to guide efforts to improve a program.

Explanation

Question 161 of 176

1

Ex-40. In what method is the program spending most of its time when executing the List All command?{

Select one of the following:

  • ArrayListDictionary.listAll().

  • dictionary.dictEntry.toString()

Explanation

Question 162 of 176

1

Ex-40. What method is called the most times?{

Select one of the following:

  • ArrayListDictionary.listAll().

  • dictionary.dictEntry.toString() is called once for each entry in the dictionary.

Explanation

Question 163 of 176

1

Ex-40. What are some possible improvements that could be investigated for this problem (low performance)? (2 right answers)

Select one of the following:

  • StringBuilder or StringBuffer

  • StringBuild or StringBuffer

  • StringBuilder or StringBuff

Explanation

Question 164 of 176

1

Ex-41. What are examples of goals when optimizing code? (3 right answers)

Select one of the following:

  • The most common goals of optimization are to maximize performance (execution speed), minimize program size (memory footprint), and/or minimize memory usage (RAM).

  • The most common goals of optimization are to maximize performance (execution speed), minimize program size (memory footprint), and/or maximize memory usage (RAM).

  • The most common goals of optimization are to minimize performance (execution speed), minimize program size (memory footprint), and/or minimize memory usage (RAM).

Explanation

Question 165 of 176

1

Ex-41. What is the 90/10 rule or law of program optimization? Please select right examples: (2 right answers){

Select one of the following:

  • 90% of execution time of a program is spent in 10% of the code and 90% of the time is spent developing/debugging 10% of the code.

  • 10% of execution time of a program is spent in 90% of the code and 90% of the time is spent developing/debugging 10% of the code.

  • 90% of execution time of a program is spent in 10% of the code and 10% of the time is spent developing/debugging 90% of the code.

Explanation

Question 166 of 176

1

Project 5 finish:

Select one of the following:

  • compare the results from data stored randomly, stored alphabetically and stored in reverse

  • do a static analysis

  • alphabetic order

  • provide an analysis of the results from running the four different solutions

  • look at search times

Explanation

Question 167 of 176

1

What was the error out of type range in ex-9?

Select one of the following:

  • 101211

  • Ascending –descending

  • Num-items – 1000

  • Array[0] - 32767

Explanation

Question 168 of 176

1

Ex-40. What is "profiling" as used in software development? Profiling is a form of dynamic program analysis that measures things like: (3 right answers){

Select one of the following:

  • memory usage, instruction usage, method calls, timing information, e.g., how much time spent in particular methods

  • memory usage, instruction usage, timing information, e.g., how much time spent in particular methods

  • memory usage, instructions, method calls, timing information, e.g., how much time spent in particular methods

Explanation

Question 169 of 176

1

Infix: ( (4 * 2) + (5 - 2) + ( ( 6 + 4) * (1 + 1) ) )
What is postfix?

Select one of the following:

  • 4 2 * 5 2 - + 6 4 + 1 1 + * +

  • 4 2 * 5 2 - + 6 4 + 1 1 + +*

  • 4 *2 5 -2 + 6 4 + 1 1 + * +

Explanation

Question 170 of 176

1

Infix: ( (4 * 2) + (5 - 2) + ( ( 6 + 4) * (1 + 1) ) )
What is Prefix :

Select one of the following:

  • +*42-52*+64+11

  • *+42-52*+64+11

  • +*42-52+*64+11

Explanation

Question 171 of 176

1

Infix: ((8-5)*((4+2)/3))
What is Postfix:

Select one of the following:

  • 8 5 - 4 2 + 3 / *

  • 8 5 - 4 2 + 3 */

  • 8 5 +4 2 - 3 / *

Explanation

Question 172 of 176

1

Infix: ((8-5)*((4+2)/3))
What is Prefix :

Select one of the following:

  • *-85/+423

  • -*85/+423

  • *-85+/423

Explanation

Question 173 of 176

1

What is Infix: ((3*((7+1)/4))+(17-5))
What is Postfix:

Select one of the following:

  • 3 7 1 + 4 / * 17 5 - +

  • 3 7 1 + 4 / * 17 5 + -

  • 3 7 1 + 4 * / 17 5 - +

Explanation

Question 174 of 176

1

What is Infix: ((3*((7+1)/4))+(17-5))
What is Prefix:

Select one of the following:

  • *+3/+714-175

  • +*3/+714-175

  • +*3+/714-175

Explanation

Question 175 of 176

1

Infix: ((3+4)*((6-2)/7))
What is Postfix:

Select one of the following:

  • 3 4 + 6 2 - /7 *

  • 3 4 + 6 2 - 7 */

  • 3 4 + 6 2 - 7 / *

Explanation

Question 176 of 176

1

Infix: ((3+4)*((6-2)/7))
What is Prefix:

Select one of the following:

  • *+34/-627

  • +*34/-627

  • *+34/6-27

Explanation