SDP4 by Zharas

Description

sdp4 Quiz on SDP4 by Zharas, created by Жарас Мергазы on 25/05/2017.
Жарас Мергазы
Quiz by Жарас Мергазы, updated more than 1 year ago
Жарас Мергазы
Created by Жарас Мергазы almost 7 years ago
1068
13

Resource summary

Question 1

Question
1. With what option we can display warnings while compile with command "gcc"?
Answer
  • -o
  • -Wall
  • -I
  • -print-sysroot

Question 2

Question
What number of classes (*.java) has project-01?
Answer
  • 3
  • 5
  • 2
  • 4

Question 3

Question
What number of source code files has ex-05 in project-01?
Answer
  • 3
  • 2
  • 4
  • 5

Question 4

Question
What number wasn’t tested in TestMainline class in prject01?
Answer
  • 4
  • 2
  • 81
  • 64
  • 91

Question 5

Question
In exercises 11-13 nodes are stored?
Answer
  • Position and salary
  • Name and study year
  • Position and birth year
  • Name and age

Question 6

Question
Ex-16. what is size of matrix in given large.txt?
Answer
  • 60
  • 50
  • 80
  • 30

Question 7

Question
What is range of verify numbers for square root in proj2?
Answer
  • 2 to 1000
  • 2 to 100
  • 2 to 100000
  • 2 to 10000

Question 8

Question
What are files in C portion of proj2?
Answer
  • 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

Question 9

Question
Ex-10 what does UNumber structure include ?
Answer
  • Value
  • Range
  • Decimal point
  • Decimal power
  • Count
  • Sign

Question 10

Question
What number of errors has code in Exercise-03?
Answer
  • 3
  • 1
  • 4
  • 2

Question 11

Question
2. "pdsa" what does it mean? (Please select the best answer)
Answer
  • 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

Question 12

Question
What does Unix command - ls?
Answer
  • refers to your home directory
  • lists the contents of a directory
  • refers to the current directory
  • displays the path of the current directory

Question 13

Question
. On a 32bit system CLOCKS_PER_SEC equals
Answer
  • 100000
  • 1000000
  • 1000000000000
  • 1000000000
  • 10000000

Question 14

Question
What should we do to remove executable and the intermediate build files?
Answer
  • rm *
  • make clean
  • make del
  • . make rm

Question 15

Question
What main benefit gives us "makefile" in doing exercises? (Please select the best answer)
Answer
  • . 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

Question 16

Question
. Project 01 ends on what number of exercises?
Answer
  • 8
  • 7
  • 5
  • 6

Question 17

Question
What does Unix command - './file'?
Answer
  • . 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

Question 18

Question
The default name of the compiled program is
Answer
  • d.out
  • a.out
  • c.out
  • the same name as source file, but with .out

Question 19

Question
2. Ex-09. What was the number of values in data.txt?
Answer
  • 300
  • 25
  • 200
  • 10
  • 500

Question 20

Question
3. What number of array's size is large enough in ex-15?
Answer
  • ~ 1 000
  • ~ 10
  • ~ 1 000 000
  • ~ 100

Question 21

Question
4. Type macros bool is contained in library:
Answer
  • ~ stdlib.h
  • ~ time.h
  • ~ stdio.h
  • ~ stdbool.h

Question 22

Question
5. What number of Exercises in Project-01?
Answer
  • 4
  • 3
  • 2
  • 5

Question 23

Question
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?
Answer
  • ~ / 100
  • ~* 10 000
  • ~ * 1 000
  • ~ * 100 000
  • ~ / 1 000 000

Question 24

Question
7. In exercise-04 we used 1E+10 to...
Answer
  • 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

Question 25

Question
8. In exercise-04 for loop we used 2nd limit for ending, and limit was what number of cycles?
Answer
  • 1+E10
  • 10
  • 20
  • 100
  • 200
  • 1000
  • 1000000

Question 26

Question
name: "PDSA" what does it mean? "PDSA" what does it mean? (Please select the best answer){
Answer
  • performance, data service and algorithms
  • performance, digital service and algorithms
  • performance, data structures and algorithms
  • performance, digital structures and algorithms

Question 27

Question
name: What does Unix command - mkdir ? What does Unix command - mkdir ?{
Answer
  • displays the path of the current directory
  • refers to the current directory
  • lists the contents of a directory
  • creates directory

Question 28

Question
How to delete files in Unix terminal? How to try to delete some files in Unix terminal?{
Answer
  • with command - del
  • with command - mv
  • with command - make clean
  • with command - cp

Question 29

Question
The default name with option "-o ex02" of the compiled program is: The name of compiled file with option "-o ex02.out" is\:
Answer
  • a.out
  • ex02
  • ex02.out
  • ex02.c

Question 30

Question
What does "makefile" include? (2 right answers){
Answer
  • %50% dependencies
  • %50% targets
  • %50% text of warning messages
  • %50% descriptions

Question 31

Question
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)?
Answer
  • make rm
  • rm *
  • rm clean
  • make del

Question 32

Question
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?
Answer
  • modify
  • make
  • touch
  • make update

Question 33

Question
What does in Unix command "./" the dot "." specify?
Answer
  • local file
  • entity of excutable file
  • current directory
  • excute only compiled files

Question 34

Question
In Unix path command "~/" tilde "~" specify?
Answer
  • root directory
  • home directory
  • current directory
  • containing directory

Question 35

Question
What does Unix command - "mkdir ../dom" ?
Answer
  • creates directory "dom" in containing directory
  • creates directory "dom" in home directory
  • creates directory "dom" in local directory
  • creates directory "dom" in current directory

Question 36

Question
The default name with option "-o task_01" of the compiled program is: The name of compiled file with option "-o task_01" is
Answer
  • a.out
  • task_01
  • task_01.out
  • task_01.c

Question 37

Question
With what option we can display warnings while compile with command "gcc"?{
Answer
  • -o
  • -Wall
  • -I
  • -print-sysroot

Question 38

Question
What does file extension have source code file in C
Answer
  • *.o
  • *.h
  • *.c
  • *.f

Question 39

Question
How to try to delete something in Unix terminal?
Answer
  • with command - del
  • with command - mv
  • with command - mkdir
  • with command - rmdir

Question 40

Question
What does Unix command - '../make_file' ?
Answer
  • 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

Question 41

Question
How we calculate new_guess number in our Newton's method?
Answer
  • 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;

Question 42

Question
Exercise-03. With Unix command "make" we can use targets at command promt, please select them: (2 right answers)
Answer
  • ~%50% clean
  • ~%50% all
  • ~%50% touch
  • ~%50% makefile

Question 43

Question
What does in Unix command "../" dots ".." specify?
Answer
  • root directory
  • home directory
  • current directory
  • containing directory

Question 44

Question
"UPM" what does it mean in Project-01?
Answer
  • Universal Precision Math
  • Unlimited Precision Model
  • Universal Precision Model
  • Universal Processor Math
  • Unlimited Precision Math

Question 45

Question
Exercise-05. How to right look in third section of man pages?
Answer
  • man clock 3
  • man -3 clock
  • man ./3 clock
  • man 3 clock

Question 46

Question
What header file (C library) we should insert in code for using "clock" function?
Answer
  • time.h
  • nanoTime.h
  • clocks.h
  • clock.h

Question 47

Question
What was search algorithm used in exercise-8?
Answer
  • recursive search
  • binary search
  • insertion
  • selection

Question 48

Question
We have C library calc.h and calc.o, what we have to do next for using this library?
Answer
  • 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

Question 49

Question
What was sort algorithm used in exercise-7?
Answer
  • bubble
  • insertion
  • selection
  • merge

Question 50

Question
For what did we use conditional compilation in exercise-8?
Answer
  • for calling library
  • for debugging information
  • for sorting array of doubles
  • for extra output

Question 51

Question
What have we learned in exercise-9 for minimizing errors in code?
Answer
  • using bubble sort
  • using constants
  • using libraries
  • using pointers

Question 52

Question
What is period of DEBUG in exercise-9?
Answer
  • 0 - 2
  • 0 - 3
  • 0 - 4
  • 0 - 5

Question 53

Question
Ex-09. Step-12: In which function is the problem? Ex-09. Step-12: In which function is the problem with ASCENDING and DESCENDING ?
Answer
  • bubble_sort
  • binary_search
  • main
  • insertion_sort

Question 54

Question
Ex-08. For #ifdef/#endif pair is right: (Please select the best answer)
Answer
  • 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

Question 55

Question
Ex-08. With what option we can define constant as a parameter to the compiler (for conditional compilation)?
Answer
  • gcc -Wall -I. -DDEBUG
  • gcc -Wall -I. -DEBUG
  • gcc -Wall -I. -DCFLAGS
  • gcc -Wall -I. -CFLAGS

Question 56

Question
Function malloc is contained in library:
Answer
  • stdlib.h
  • time.h
  • stdio.h
  • stdbool.h

Question 57

Question
Ex-10. What does UNumber structure include? (3 right answers){
Answer
  • sign
  • decimal power
  • value
  • range
  • decimal point
  • count

Question 58

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

Question 59

Question
Ex-13. With what format in function printf can program display the values of pointers?
Answer
  • %f
  • %v
  • %s
  • %p

Question 60

Question
What is result of "5" + "2" in ASCII codes?
Answer
  • 7
  • 103
  • 52
  • 155

Question 61

Question
What is false for Single Linked List?
Answer
  • has head and tail nodes
  • has pointer for previous node
  • we can move node by node only to one direction
  • we can insert node

Question 62

Question
What is false for Double Linked List?
Answer
  • has head and tail nodes
  • has pointer for previous node
  • we can move node by node only to one direction
  • we can insert node

Question 63

Question
With what function we allocate memory?
Answer
  • givmem
  • free
  • malloc
  • alloc

Question 64

Question
Exercise-14. You can build Java programs at the command line using command:
Answer
  • make
  • gcc -Wall
  • javac
  • java

Question 65

Question
What is result of "8" + "7" in ASCII codes?
Answer
  • 15
  • 111
  • 87
  • 159

Question 66

Question
Exercise-14. You can run Java programs at the command line using command:
Answer
  • .\
  • gcc -Wall
  • javac
  • java

Question 67

Question
With what function we release memory?
Answer
  • calloc
  • free
  • malloc
  • alloc

Question 68

Question
What is result of "8" + "3" in ASCII codes?
Answer
  • 11
  • 107
  • 83
  • 159

Question 69

Question
What is true for Single Linked List?
Answer
  • 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

Question 70

Question
What is true for Double Linked List?
Answer
  • 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

Question 71

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

Question 72

Question
Pointer arithmetric formula for 2-dim arrays in C?
Answer
  • p + (num_cols * row) + col
  • p * (num_cols * row) + col
  • p + (num_cols + row) * col

Question 73

Question
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
Answer
  • True
  • False

Question 74

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

Question 75

Question
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?
Answer
  • 111 111 000
  • 110 110 000
  • 000 101 101
  • 001 100 100

Question 76

Question
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?
Answer
  • 001 110 000
  • 110 110 000
  • 100 000 001
  • 001 100 100

Question 77

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

Question 78

Question
Ex-16. Conway Game of Life. What colony of cells will survive on next iteration?
Answer
  • 111
  • 10101
  • 11011
  • 101

Question 79

Question
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?
Answer
  • 000 111 000
  • 110 110 000
  • 110 100 000
  • 101 101 000

Question 80

Question
What is purpose of argument -s in Project-02?
Answer
  • 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

Question 81

Question
What does Lex do?
Answer
  • 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

Question 82

Question
What does the following regular expression match?[-+]?[[\:digit\:]]+/[[\:digit\:]]+</p>
Answer
  • <p>+4/5</p>
  • <p>+2/3+</p>
  • <p>-+2/6</p>
  • <p>-4/5+</p>

Question 83

Question
What does the following regular expression match?[-+]?[[\:digit\:]]+</p>
Answer
  • ~<p>75</p>
  • ~<p>+23a</p>
  • ~<p>-26g</p>
  • ~<p>?32f</p>

Question 84

Question
What is FSM?
Answer
  • Finite System Machine
  • Finite Service Machine
  • Final System Model
  • Finite State Machine

Question 85

Question
Which string is right for FSM with model\: ( 0 ) \~ a-z \~ ( 1 ) \~ 0-9 \~ ( 2 ) \~ @ \~ ( 3 ) \~ a-z \~ (( 4 ))
Answer
  • 012@34
  • tt@r
  • 0a12@a
  • f0@x

Question 86

Question
The Lex program has existed since the...
Answer
  • 1960
  • 1980
  • 1970
  • 1990

Question 87

Question
Select a regular expression that matches : 10k or 10K
Answer
  • ~[[:digit:]]+[kK]
  • ~[[:digit:]]+[kK]?
  • ~[[:digit:]][kK]*
  • ~[[:digit:]][k]

Question 88

Question
Select a regular expression that matches : Strings that contain an optional minus or plus followed by zero or more alphabetic characters
Answer
  • ~[-+][[:alnum:]]*
  • ~[-+][[:alpha:]]*
  • ~[-+][[:alnum:]]+
  • ~[-+]?[[:alpha:]]+
  • ~[-+]?[[:alpha:]]*

Question 89

Question
What do the following regular expressions match [-+][[:digit:]]*?
Answer
  • 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.

Question 90

Question
What FSM recognizes this string token? "2*2~4"
Answer
  • ( 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 ))

Question 91

Question
Select a regular expression that matches : Strings that contain a required minus or a plus followed by zero or more alpha-numeric characters
Answer
  • [-+][[:alnum:]]*
  • [-+]?[[:alpha:]]*
  • [-+][[:alnum:]]+
  • [-+]?[[:digit:]]+
  • [-+][[:alpha:]]+

Question 92

Question
What does the following regular expression match?[-+]?[[\:digit\:]]+</p>
Answer
  • <p>23</p>
  • <p>+45</p>
  • <p>26g+</p>
  • <p>?32f</p>

Question 93

Question
What does the following regular expression match?[-+]?[[\:alnum\:]]+/[^$]+</p>
Answer
  • <p>gf26/dsfeg</p>
  • <p>gf23/dsfeg$</p>
  • <p>-123g/ffef$</p>
  • <p>?123f/ffef</p>

Question 94

Question
9. What does the following regular expression match? [-+]?[[\:alnum\:]]+/[^$]+
Answer
  • <p>abs123/ffef</p>
  • <p>abs123/ffef$</p>
  • <p>-26g/dsfeg$</p>
  • <p>?32f/wrw$</p>

Question 95

Question
10. What does this Unix commad\: lex baseline.lex?
Answer
  • 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

Question 96

Question
What do the following regular expressions match "iitu[!]?" ?
Answer
  • 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 !.

Question 97

Question
What FSM recognizes this string token? "d7@r"
Answer
  • ( 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 ))

Question 98

Question
For calling FSM program we need:
Answer
  • token file
  • definition file
  • input file
  • note file

Question 99

Question
In UNIX console "ls *.[ch]" command what will do?
Answer
  • 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

Question 100

Question
What FSM recognizes this string token? "apt-7,bld#2"
Answer
  • ( 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 ))

Question 101

Question
For calling FSM program we need
Answer
  • token file
  • file with definitions
  • output file
  • note file

Question 102

Question
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?{
Answer
  • 11100
  • 10101
  • 11011
  • 00111

Question 103

Question
Ex1-4. The name of compiled file with option "-o wall2" is
Answer
  • a.out
  • wall2
  • wall2.out
  • wall2.o

Question 104

Question
Ex-22. Java tokenizer program recognizes... (2 right answers)
Answer
  • Unumber
  • number
  • string tokens
  • char tokens

Question 105

Question
Ex-23 program was enhaced to skip: (2 right answers)
Answer
  • octal numbers
  • comments
  • white space
  • Unknown tokens

Question 106

Question
Ex-25 program was enhaced to recognize: (2 right answers)
Answer
  • special characters
  • reserved words
  • operators
  • comments

Question 107

Question
In Ex-22 we don't recognize fully those tokens : (2 right answers)
Answer
  • number
  • UNKNOWN
  • octal
  • string

Question 108

Question
Character "f" represents command
Answer
  • hexadecimal digit
  • octal digit
  • final state
  • any digit

Question 109

Question
Character "h" represents command
Answer
  • hexadecimal digit
  • octal digit
  • final state
  • any digit

Question 110

Question
Character "d" represents command
Answer
  • hexadecimal digit
  • octal digit
  • nonzero digit
  • any digit

Question 111

Question
Character "z" represents command
Answer
  • hexadecimal digit
  • octal digit
  • nonzero digit
  • any digit

Question 112

Question
Character "o" represents command:
Answer
  • hexadecimal digit
  • octal digit
  • nonzero digit
  • any digit

Question 113

Question
Character "p" represents command:
Answer
  • specific character
  • pointer
  • final state
  • printable ascii

Question 114

Question
Character "c" represents command
Answer
  • specific character
  • pointer
  • final state
  • printable ascii

Question 115

Question
Character "a" represents command:
Answer
  • a specific character
  • an alpha character
  • an any character
  • a printable ascii

Question 116

Question
For those characters that are not recognized by the FSM, all transitions for the row are set to...
Answer
  • 0
  • -1
  • f
  • *

Question 117

Question
Ex-25. What are words reserved? (2 right answers)
Answer
  • GREATER_THAN
  • AUTO
  • STATIC
  • EQUAL

Question 118

Question
Ex-25. What are words NOT reserved, they are operators? (2 right answers)
Answer
  • REGISTER
  • NOT
  • MINUS_MINUS
  • SWITCH

Question 119

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

Question 120

Question
Ex-29. A naive binary search tree is...
Answer
  • balanced
  • full
  • general
  • complete
  • perfect

Question 121

Question
Ex-30. What is right for relative search time for trees with random and sorted data?(2 right answers)
Answer
  • 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

Question 122

Question
Ex-31. AVL tree is...
Answer
  • naive binary tree
  • binary search tree
  • full binary tree
  • balanced binary tree

Question 123

Question
ex-29: the program is missing code:
Answer
  • adding notes
  • getting nodes.
  • Inserting nodes
  • Deleting nodes

Question 124

Question
. An AVL tree is...{
Answer
  • a self-completing binary search tree
  • a naive binary search tree
  • a self-routed binary search tree
  • a self-balancing binary search tree

Question 125

Question
Ex-31. The height of an AVL tree is most
Answer
  • 1.44*log2(n)
  • 3.14*log2(n+2)-1
  • log2(n+2)-1
  • 1.44*log2(n+2)-1

Question 126

Question
Ex-31. The height of a tree of one billion nodes will be: (Please type just one any number)
Answer
  • 42
  • 43
  • 44
  • 45

Question 127

Question
What are methods we have added in ChainHashTable.java?(2 right answers)
Answer
  • insert()
  • get()
  • hash()
  • del()

Question 128

Question
Ex-32. What are advantages have Hash table?(2 right answers)
Answer
  • 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

Question 129

Question
Ex-33. With what 2 values you can change setup of Experiment.java?(2 right answers)
Answer
  • hashCode
  • keyRadix
  • hashPrime
  • avgKey

Question 130

Question
Lec. Binary tree is:(2 right answers)
Answer
  • left tree
  • a root
  • left subtree
  • right tree

Question 131

Question
Lec. Binary tree's properties:(2 right answers)
Answer
  • average depth of left subtree
  • max of leaves
  • max of nodes
  • average depth of leaves

Question 132

Question
Lec. Binary Search Tree's properties: (2 right answers)
Answer
  • 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

Question 133

Question
Lec. Hash Tables:(2 right answers)
Answer
  • Large-scale distributed systems
  • Effective way of implementing dictionaries
  • Generalization of ordinary arrays
  • Memory-management tables in operating systems

Question 134

Question
Ex-37. In exercise the enhanced program has been modified: (3 right answers)
Answer
  • Build expression trees for Boolean expressions
  • to recognize Boolean expressions
  • evaluate boolean expressions
  • to recognize arithmetic expressions
  • build expression trees for arithmetic expressions

Question 135

Question
Many languages allow overloading of operators. The is true or false in java?
Answer
  • True
  • False

Question 136

Question
Ex-37. For example, the "+" operator does different things depending on what its operands are: (3 right answers
Answer
  • 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

Question 137

Question
Ex-37. In exercise we can have 3 classes of operators: (3 right answers)
Answer
  • Arithmetic
  • relational
  • logical
  • logic
  • relation

Question 138

Question
Ex-34. The program prompts the user for commands, then executes the commands. Unrecognized command is
Answer
  • Insert
  • Quit
  • Dump
  • Set
  • Print
  • Reset

Question 139

Question
Ex-35. Which activity was NOT performed?
Answer
  • Collect data by running the program
  • Collect data by checking the program
  • Collect data by executing the program

Question 140

Question
Ex-30. What are varying values for variables have used?(2 right answers)
Answer
  • Step
  • Maxsize
  • MinSize
  • Level

Question 141

Question
Ex-32. What are methods we have added in ChainHashTable.java?(2 right answers)
Answer
  • Add()
  • hashtabletostring()
  • setIn()
  • gettable()

Question 142

Question
Ex-32. What are advantages have BST?(2 right answers)
Answer
  • 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

Question 143

Question
Ex-41. When the linked list is better?
Answer
  • The number of items is very large
  • The number of items Is small

Question 144

Question
Ex-41. When the tree is better?
Answer
  • The number of items Is small
  • The number of items is very large

Question 145

Question
Ex-41. What are advatanges have a double linked list and linear search?
Answer
  • fast search
  • small code
  • simple algorithm
  • more complex code

Question 146

Question
In project 05 what 2 types of algorithms are used?
Answer
  • BBT AWL
  • BST AVL
  • Hash Table
  • Hash Tree

Question 147

Question
Project 5 length?
Answer
  • 5
  • 4
  • 3
  • 6

Question 148

Question
Project 5 height
Answer
  • 12
  • 14
  • 16
  • 15

Question 149

Question
Project 5: the static analysis of the hash table should include:
Answer
  • The longest length chain
  • Average length of non-zero length chain
  • The shortest length chain
  • Average length of non-zero height chain

Question 150

Question
Ex-42. what is whatchpoint?
Answer
  • Changing variable
  • Creating variable
  • Writing varibale
  • Changing value

Question 151

Question
Project 5. for the last two solutions you will need to?
Answer
  • Minimal node in tree
  • Tree height
  • Avl expected tree limit
  • Average length of non-zero chains

Question 152

Question
Project 5 four versions:
Answer
  • arraylist, array, avl BST, hash table
  • arraylist, value, avl BST, hash table
  • arraylist, array, variable, hash table

Question 153

Question
Project 5 words?
Answer
  • 250 000 words
  • 50 000 words
  • 100 000 words
  • 1000 000 words

Question 154

Question
Project 5 found at first time:
Answer
  • 25000
  • 50000
  • 100000
  • 250000

Question 155

Question
Project 5 didn’t find at first time:
Answer
  • 25000
  • 50000
  • 250000
  • 100000

Question 156

Question
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:]]+
Answer
  • [dD]?[[:digit:]]+
  • [Dd]?[[:digit:]]+
  • [Dd]?[[:digit:]]

Question 157

Question
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:]]+{
Answer
  • [eE][[:digit:]]+
  • [eE][[:digits:]]+
  • [dD][[:digit:]]+

Question 158

Question
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:]]+{
Answer
  • [nN][[:digit:]]+
  • [nN][[:digit:]]
  • [eE][[:digit:]]+
  • [dD][[:digit:]]+

Question 159

Question
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:]]+{
Answer
  • [+-]?[[:digit:]]+[[:alpha:]]+
  • [+-]?[[:digit:]]+[pi]
  • [+-]?[[:digit::]]+[pi]

Question 160

Question
Ex-40. Why might using a profiler on your code be useful? (2 right answers)
Answer
  • 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.

Question 161

Question
Ex-40. In what method is the program spending most of its time when executing the List All command?{
Answer
  • ArrayListDictionary.listAll().
  • dictionary.dictEntry.toString()

Question 162

Question
Ex-40. What method is called the most times?{
Answer
  • ArrayListDictionary.listAll().
  • dictionary.dictEntry.toString() is called once for each entry in the dictionary.

Question 163

Question
Ex-40. What are some possible improvements that could be investigated for this problem (low performance)? (2 right answers)
Answer
  • StringBuilder or StringBuffer
  • StringBuild or StringBuffer
  • StringBuilder or StringBuff

Question 164

Question
Ex-41. What are examples of goals when optimizing code? (3 right answers)
Answer
  • 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).

Question 165

Question
Ex-41. What is the 90/10 rule or law of program optimization? Please select right examples: (2 right answers){
Answer
  • 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.

Question 166

Question
Project 5 finish:
Answer
  • 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

Question 167

Question
What was the error out of type range in ex-9?
Answer
  • 101211
  • Ascending –descending
  • Num-items – 1000
  • Array[0] - 32767

Question 168

Question
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){
Answer
  • 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

Question 169

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

Question 170

Question
Infix: ( (4 * 2) + (5 - 2) + ( ( 6 + 4) * (1 + 1) ) ) What is Prefix :
Answer
  • +*42-52*+64+11
  • *+42-52*+64+11
  • +*42-52+*64+11

Question 171

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

Question 172

Question
Infix: ((8-5)*((4+2)/3)) What is Prefix :
Answer
  • *-85/+423
  • -*85/+423
  • *-85+/423

Question 173

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

Question 174

Question
What is Infix: ((3*((7+1)/4))+(17-5)) What is Prefix:
Answer
  • *+3/+714-175
  • +*3/+714-175
  • +*3+/714-175

Question 175

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

Question 176

Question
Infix: ((3+4)*((6-2)/7)) What is Prefix:
Answer
  • *+34/-627
  • +*34/-627
  • *+34/6-27
Show full summary Hide full summary

Similar

Resumo global da matéria de Biologia e Geologia (10.º e 11.º anos)
miminoma
CHEMISTRY C1 2
x_clairey_x
Geography Coastal Zones Flashcards
Zakiya Tabassum
Statistics Equations & Graphs
Andrea Leyden
GCSE English Language Overview
philip.ellis
Biology AS Level UNIT 1
Valentin Andrei
GCSE AQA Biology - Unit 3
James Jolliffe
Haemoglobin
Elena Cade
Creating Mind Maps with GoConqr
Andrea Leyden
GCSE AQA Physics Unit 2 Flashcards
Gabi Germain
Groups Starter Pack
Micheal Heffernan