QUESTIONS T2

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Answer A POP3

22. Which of the following is not a protocol used in the basic TCP/IP software hierarchy? A. POP3 B. UDP C. TCP D. IP

the grammar allows more than one parse tree for a single string

to say that grammar is ambiguous means that________

Third generation

High Level Languages are____

PROCESS

1. Which of the following is an activity? A. Algorithm B. Program C. Process

ANSWER: C Router versus Bridge

1. Which of the following is not a way of classifying networks? A. WAN versus LAN B. Closed versus open C. Router versus bridge D. Star versus bus

5000

10. At most, how many entries in a list of 5000 names will be interrogated when using the sequential search algorithm? ___________

ANSWER: A THETA(Lgn)

10. The binary search algorithm is an example of an algorithm in which of the following classes? A. (lg n) B. (n) C. (n lg n) D. ( n 2 )

ANSWER: The value reported should be X - 1.

10. The following procedure was designed to compute the largest integer whose square is no greater than N, where N is assumed to be a positive number. (If N is 5, then the procedure should report the value 2.) Find and correct the error. procedure squareroot (N) X 0; while (X2 N) do (X X + 1); report the value of X

ANSWER: B Server

10. Which of the following is not a means of connecting networks? A. Switch B. Server C. Router D. Bridge

ANSWER: B X > 4

11. Under the assumption that X takes on only integer values, which of the following is the termination condition for the following loop? while (X < 5) do ( . . . ) A. X < 5 B. X > 4 C. X < 4

ANSWER: D LINK

11. Which layer of the TCP/IP hierarchy actually transmits a message? A. Application B. Transport C. Network D. Link

Sequential

11. Which of the sequential or binary search algorithms would find the name Kelly in the list John, Kelly, Lewis, Maurice, Nathan, Oliver, Pat, Quincy, Roger, Stan, Tom more quickly? _______________

ANSWER: A

12. Under the assumption that X takes on only integer values, which of the following is the termination condition for the following loop? repeat ( . . . ) until (X < 5) A. X < 5 B. X > 4 C. X > 5

ANSWER: B Transport

12. Which layer of the TCP/IP hierarchy chops messages into units whose size is compatible with the Internet? A. Application B. Transport C. Network D. Link

BINARY

12. Which of the sequential or binary search algorithms would find the name Roger in the list John, Kelly, Lewis, Maurice, Nathan, Oliver, Pat, Quincy, Roger, Stan, Tom more quickly? ____________

ANSWER: B N>4

13. Under the assumption that N takes on only integer values, which of the following is the termination condition in the following recursive procedure? procedure xxx (N) if (N < 5) then (apply the procedure xxx to the value N + 1) else (print the value of N) A. N < 5 B. N > 4 C. N < 4

ANSWER: C Network

13. Which layer of the TCP/IP hierarchy decides the direction in which message segments are transferred across the Internet? A. Application B. Transport C. Network D. Link

ANSWER: A N<5

14. Under the assumption that N takes on only integer values, which of the following is the termination condition in the following recursive procedure? procedure xxx (N) if (N < 5) then (print the value of N) else (apply the procedure xxx to the value N - 1) A. N < 5 B. N > 4 C. N > 5

ANSWER: A Application

14. Which layer of the TCP/IP hierarchy decides which application should receive an incoming message? A. Application B. Transport C. Network D. Link

ANSWER: A Application

15. Which layer of the TCP/IP hierarchy presents incoming messages to the computer user? A. Application B. Transport C. Network D. Link

ANSWER: D X<=5

15. Which of the following is a loop invariant at the point at which the test for termination is performed in the following loop structure? X 3; while (X < 5) do (X X + 2) A. X > 5 B. X < 5 C. X 5 D. X 5

ANSWER: B Transport

16. Which layer of the TCP/IP hierarchy reassembles messages as their pieces arrive at the destination? A. Application B. Transport C. Network D. Link

ANSWER: B X<8

16. Which of the following is a loop invariant at the point at which the test for termination is performed in the following loop structure? X 3; repeat (X X + 2) until (X > 5) A. X > 5 B. X < 8 C. X 5 D. X 6

ANSWER: A Application

17. Which layer of the TCP/IP hierarchy is responsible for obtaining the correct address for a message's destination? A. Application B. Transport C. Network D. Link

ANSWER: B N=0

17. Which of the following is the base case in the recursive procedure below? procedure xxx (N) if (N = 0) then (print the value of N) else (apply the procedure xxx to the value N - 1) A. N > 0B. N = 0 C. N < 0

ANSWER: C Assertions

18. Preconditions, postconditions, and loop invariants are examples of which of the following? A. Pseudocode B. Iterative structures C. Assertions D. Recursion

ANSWER: B Port Number

18. Which of the following identifies the application to which a message arriving from the Internet should be given? A. Protocol B. Port number C. Domain D. Hop count

ANSWER: C X X + 1) until (X > 6)

19. Which of the following does not print the same sequence of numbers as the others? A. X 5 B. X 4 C. X 5 while (X < 6) do while (X < 5) do repeat (print the value of X; (X X + 1; (print the value of X; X X + 1) print the value of X) X X + 1) until (X > 6)

ANSWER: C ISO

19. Which standards organization produced the OSI reference model for internet communication? A. ANSIB. IEEE C. ISO

ANSWER: C BUS

2. Ethernet is a means of implementing which of the following network topologies? A. Star B. WiFi C. Bus

ANSWER: TCP and UDP

2. What are two protocols for implementing the transport level in the "TCP/IP hierarchy"? A. _____________ B. ______________

PROGRAM

2. Which of the following is a representation? A. Algorithm B. Program C. Process

ANSWER: C FTP

20. Which of the following is an Internet application that is named after its underlying protocol? A. Email B. World Wide Web C. FTP D. UDP

ANSWER: A Stepwise Refinement

20. Which of the following is not a way of representing algorithms? A. Stepwise refinement B. Pseudocode C. Flowchart D. Programming language

Answer D Applets

21. Which of the following is not a means of implementing server-side activities? A. CGI B. JSP C. ASP D. Applets

ANSWER: B ROUTER

3. Which of the following connects existing networks to form an internet? A. Bridge B. Router C. Switch D. Repeater

ANSWER: B X+1

3. Which of the following set of instructions defines an algorithm in the formal, strict sense? A. X 3; B. X+1 3; C. X 3; while (X < 5)do while (X < 5) do while (X < 5) do (X X) (X X + 1) (X X - 1)

ANSWER: No, the instructions are not executable (not effective).

4. Do the following instructions define an algorithm? Explain your answer. Write down all the positive odd integers. Select the integer in the middle of the list. Print the even integer that is one less than the selected odd integer.

ANSWER: B CSMA/CD

4. Which of the following is a protocol for controlling the right to transmit a message in a network? A. UDP B. CSMA/CD C. TCP D. FTP

D Assignment Statement

4. Which of the following is not a means of repeating a block of instructions? A. Pretest loop B. Posttest loop C. Recursion D. Assignment statement

ANSWER: A LEWIS

5. When searching within the list Lewis, Maurice, Nathan, Oliver, Pat, Quincy, Roger, Stan, Tom which of the following entries will be found most quickly using the sequential search algorithm? A. Lewis B. Pat C. Tom

ANSWER: B ICANN

5. Which of the following is not a means of performing interprocess communication over a network? A. Client/server B. ICANN C. Peer-to-peer

ANSWER: B PAT

6. When searching within the list Lewis, Maurice, Nathan, Oliver, Pat, Quincy, Roger, Stan, Tom which of the following entries will be found most quickly using the binary search algorithm? A. Lewis B. Pat C. Tom

ANSWER: C Access ISPs

6. Which of the following is assigned the task of providing individual users access to the Internet? A. Tier-1 ISPs B. Tier-2 ISPs C. Access ISPs D. ICANN

ANSWER: D CERT

7. Which of the following is not an application of the Internet? A. FTP B. Email C. Telnet D. CERT

ANSWER: C Alice Sylvia Nancy Lois

7. Which of the following lists would not be obtained at some point when applying the insertion sort algorithm to the list below? Sylvia Nancy Lois Alice A. Nancy B. Alice C. Alice D. Lois Sylvia Lois Sylvia Nancy Lois Nancy Nancy Sylvia Alice Sylvia Lois Alice

Answer B Theta(n)

8. In general, an algorithm in which of the following categories is considered more efficient? A. (lg n) B. (n) C. (n lg n) D. ( n 2 )

ANSWER: A ICANN

8. The primary purpose of which of the following is not the enhancement of security? A. ICANN B. Firewall C. Encryption D. CERT

ANSWER: 13

9. At most, how many entries in a list of 5000 names will be interrogated when using the binary search algorithm? ___________

Answer D THETA(n^2)

9. The insertion sort algorithm is an example of an algorithm in which of the following classes? A. (lg n) B. (n) C. (n lg n) D. ( n 2)

ANSWER: C Name Server

9. Which of the following is used to translate between IP addresses and mnemonic addresses? A. File server B. Mail server C. Name server D. FTP server

homogenous heterogeneous

A ___ array is an array in which all entries are of the same type whereas entries in _____ array may be of different types

Program

A representation of an algorithm (perhaps nonterminating algorithm)

Second generation

Assembly Languages are ____

formal paramater (DATA TO BE EXECUTED) is used in a subprogram unit to refer to that data to be executed an actual paramater (DATA GIVEN TO THE SUBPROGRAM UNIT) is that data that is given to the subprogram unit

Difference between a formal paramater and an actual paramater?

a procedure returns values via paramaters and variables a function returns a value as the "value of the function"

Difference between a procedure and a function?

translate the program is to convert it to another language interpreting the program is to execute it directly from its language form.

Difference between translating a program and interpreting the program?

global variable is readily accessible throughout the program whereas a local variable is accesibale only within a specific area

Distinction between global and local variables?

ANSWER: 18.12

Express the bit pattern 0001001000001100 in dotted decimal notation.

ANSWER: The termination condition will never be reached because X will always be odd.

Identify a flaw in the control of the following loop. X 3 while (X 8) do (X X + 2)

ANSWER: IP

Identify a protocol used in the implementation of the network layer in the TCP/IP hierarchy. ______________

ANSWER: CSMA/CD and CSMA/CA

Identify two protocols used in networks to determine the right to transmit an original message. A. _________________ B. _________________

No, the process will terminate because X will become negative due to overflow.

If numeric values are represented in two's complement notation, does the following program represent an infinite process? Explain your answer. X 2 while (X > 0) do (X X + 1)

A list of the formal paramters

In addition to the procedures name what other information is contained in a typical procedure header?

natural formal

In contrast to ____-languages such as english and spanish, programming languages are considered ____ languages and are rigorously defined by their grammar.

method

In the context of object oriented paradigm, a ______ is an imperative program unit that describes how an object should react to a particular stimulus.

Classes Objects

In the context of object oriented paradigm,____ are templates from which ____ are constructed

Integer, Real, Boolean, Character

List four data types that occur as primitive types in many high level programming languages?

ANSWER: .com, org, edu, gov, net, uk, ca, etc

List four top-level domains. A. _____________ B. _______________ C. _____________ D. _______________

Name of Variables Data types Data structures

List three items of information that would be contained in a typical parsers symbol table?

ANSWER: the assignment statement using , the if-then-else statement, the while statement, the repeat statement, and the definition and activation of procedures. WHILE REPEAT IF THEN

List three of the primitives in the pseudocode developed in this chapter. ____________________ ____________________ ____________________

They are machine dependent they require an algorithm be expressed in small machine steps

List two disadvantages of both machine languages and assembly languages that are overcome by high level programming?

Tags are surrounded by < and >, tags that close an item are the same as the opening tag except that / is added, tag name are in lower case, and others.

List two features of HTML that conform to the XML style. A. _____________________________ B. _____________________________

ANSWER: star and bus

List two network topologies. A. _____________ B. _____________

First Generation

Machine Languages are____

Imperative paradigm

Most machine languages are based on the ______

ANSWER: name server, file server, mail server, Web server, etc

Name three kinds of servers. A. ___________________________ B. ___________________________ C. ___________________________

Indicies

Positions within arrays are identified by means of numbers called A. Indicies B. Paramaters C. Instance Variables D. Constants

B T or P

RESOLVENT OF THE FOLLOWING CLASSES Q or P or T ?

ANSWER: server, clients, peer-to-peer

The client/server model refers to a form of interprocess communication in which one process, known as the ________________ , runs continuously so that it can be contacted by other processes, known as ________________ , as needed. In contrast is the ____________________ model of interprocess communication in which two processes communicate as equals.

Imperative requires that a programmer describes an algorithm for solving at hand Declarative requires that the programmer describes the problem

The distinction between the imperative and declarative programming paradigms?

ANSWER: Tier-1, tier-2, access

The main purpose of _______ and ________ ISPs is to provide a system of high-speed routers that serve as the Internet's communication backbone, whereas _________ ISPs concentrate on providing Internet access to the Internet's users.

If while else for class

Three examples of key words that are often found in high level languages?

ANSWER: 00100001 00101010 00010010 (212A12 in hexadecimal)

What bit pattern is represented by 33.42.18 in dotted decimal notation?

INTEGER = Twos Compliment Real= Floting Point Character = ASCII

What encoding system is usted to encode data of each type? INTERGER= REAL= CHARACTER=

ANSWER: 3

When searching for the entry X within the list R, S, T, U, V, W, Z how many entries will be considered before discovering that the entry is not present? (Note that the list is in alphabetical order.)? ____________

ANSWER: B PAT

When searching within the listLewis, Maurice, Nathan, Oliver, Pat, Quincy, Roger, Stan, Tom which of the following entries will be found most quickly using the binary search algorithm? A. Lewis B. Pat C. Tom

ANSWER: A Lewis

When searching within the listLewis, Maurice, Nathan, Oliver, Pat, Quincy, Roger, Stan, Tom which of the following entries will be found most quickly using the sequential search algorithm? A. Lewis B. Pat C. Tom

ANSWER: C Network

Which layer of the TCP/IP hierarchy directs message segments through the Internet so that they get closer and closer to their destination? A. ApplicationB. Transport C. Network D. Link

Application

Which layer of the TCP/IP hierarchy is responsible for obtaining the correct URL(Uniform Resource Locator) for a message's destination? A. Application B. Transport C. Network D. Link

ANSWER: B Transport

Which layer of the TCP/IP hierarchy reassembles messages as their pieces arrive at the destination? A. Application B. Transport C. Network D. Link

Answer C do-while

Which of the following Java statements is guaranteed to loop at least one time?A. for B. while C. do-while

Assignment statement

Which of the following does not require a boolean structure? A. If Then else B while loop C assignemnet D for loop

Answer B: Port Number

Which of the following identifies the application to which a message arriving from theInternet should be given? A. Protocol B. Port number C. Domain D. Hop count

Inheritance

Which of the following is a means of defining similiar yet different classes in an object oriented program ? A. Inheritance B. Parsing C. Coercion D. Code Optimization

Coercion

Which of the following is a means of nullifying conflicts among data types? A. Inheritance B. Parsing C. Coercion D. Code optimization

Answer B Program

Which of the following is a representation? A. Algorithm B. Program C. Process

Answer: C Process

Which of the following is an activity? A. AlgorithmB. ProgramC. Process

LISP

Which of the following is an example of a language that is based on the functional paradigm? A. LISP B. PROLOG C. C D. C++

C++

Which of the following is an example of a language that is based on the object oriented paradigm A. LISP B. PROLOG C. C D. C++

comment statements

Which of the following is ignored by a compiler? a control statements b declarations of constants c procedure headers d comment statements

Assignment Statement

Which of the following is not a control statement? A. IF THEN ELSE B While loop C. Assignment statement D. For loop statement

B 5

Which of the following is not a possible value of the expression 4+6/2 -1 ? a 4 b 5 c 6 d 10

A. POP3

Which of the following is not a protocol used in the basic TCP/IP software hierarchy? A. POP3 B. UDP C. TCPD. D. IP

Executing the program

Which of the following is not a step in the process of translating a program? A. Executing the program B. Parsing the program C. Lexical Analysis D. Code Generation

Exclamatory Statement

Which of the following is not a type of statement found in a typical high level imperative programming language? A. Imperative statement B. Exclamatory Statement C.Declarative Statement D. Comment statement

Type

Which of the following is not a way of referring to a value in a program? A. VARIABLE B LITERAL C Constant D Type

Resolution

Which of the following is not associated with object oriented programming A. Inheritance B. Resolution C. Encapsulation D. Polymorphism

Operator Precedence

Which of the following is not associated with the concept of data type? A. Coearcion B. Boolean C. Operator Precedence D. Strongly Typed language

Source Code

Which of the following is not constructed by a typical compiler? A. Source Code B. Symbol Table C. Parse Tree D. Object program

B The portion of the program in which the variable can be accessed

Which of the following is the scope of a variable? A. The number of characters B. The portion of the program in which the variable can be accessed C. THE TYPE D. THE STRUCTURE

it fails to reflect the array of distinct programming paradigms

Why does the generation approach to classify programming languages fails the scope of todays language?

VALUE= 3 REFERENCE = 5

X goes to 3; sub(X); print the value of x Procdure sub (y) Y goes to 5 printed by passed by value? printed by passed by reference?

Process

___ is the action of executing a program (or algorithm)

Algorithm

____ is n ordered collection of unambiguous, executable steps that defines a terminating process

it means that the programs written in the language do not refer to properties of a specific machine. Compatible with any computer

what does it mean to say that a programming language is machine dependent?


Ensembles d'études connexes

PRACTICE QUESTIONS • RENAL SYSTEM •

View Set

CNA 234 / Chapter 1 - Introducing Active Directory (incomplete)

View Set

TQM Chapter 6: Quality in Customer-Supplier Relationships

View Set

Joshua 17 - Flashcard MC questions - Ted Hildebrandt

View Set