chevron_left
0 points
15 11 8

Click Here For Part 1

Q46. Which of the following translates and executes instructions in a programming language? A. A compiler B. A text editor C. A loader D. An interpreter

Answer:

An interpreter

Q47. The following pseudocode algorithm has an error. The program is supposed to ask the user for the length and width of a rectangular room, and then display the room‘s area. The program must multiply the width by the length in order to determine the area. Find the error. area = width x length Display “What is the room‘s width?“. Input width. Display “What is the room‘s length?“ Input length. Display area.

Answer:

The error is that the program performs its math operation before the user has entered values for the variables length and width.

Q48. A price change causes the quantity demanded of a good to decrease by 18%, while the total revenue of that good decreases by 20%. True or False: The demand curve is elastic in this region.

Answer:

TRUE

Q49. A price change causes the quantity demanded of a good to increase by 12%, while the total revenue of that good decreases by 16%. True or False: The demand curve is elastic in this region.

Answer:

FALSE

Q50. A price change causes the quantity demanded of a good to increase by 15%, while the total revenue of that good increases by 10%. True or False: The demand curve is elastic in this region.

Answer:

TRUE

Q51. The insertion sort algorithm works by

Answer:

repeatedly taking the first value in the unsorted portion of the array and placing it at its proper place in the part of the array that is already sorted

Q52. The worst-time complexity for merge sort is ________.

Answer:

n log n

Q53. If you issue the command enable algorithm-type scrypt secret mypassword and then you issue the command enable algorithm-type sha256 secret otherpassword, what will the effective password be?

Answer:

otherpassword

Q54. The command enable algorithm-type scrypt secret password enables which of the following configurations?

Answer:

SHA-256

Q55. How can we modify almost any algorithm to have a good best-case running time?

Answer:

The best-case is therefore often not a good indicator of effectiveness of an algorithm.

Q56. What does it mean for a sorting algorithm to be stable vs unstable?

Answer:

A sorting algorithm is stable if it preserves the original order and unstable if it does not.

Q57. What are the advantages and disadvantages of merge sort?

Answer:

1. Advantage - One advantage of merge sort is that it is very efficient in sorting large arrays or lists. 2. Disadvantage - A disadvantage is that it is inefficient in sorting small arrays.

More Posts

Top 57 Algorithm Quiz Question and Answer Lalit Kumar - Jan 21
Quizzes On Algorithm: Solved Questions and Answers Lalit Kumar - Jan 21
Top 17 SQL-server Quiz Question Answers (Solved) Lalit Kumar - Jan 21
50+ Top Excel Tricks Quiz Questions and Answers Lalit Kumar - Jan 21
Top Database Quiz Questions and Answers - Computer Science Lalit Kumar - Jan 20
Top 25 XML Quiz Questions Answers To Learn in 2021 Lalit Kumar - Jan 21
Database Online Quiz Questions Answers 2 Lalit Kumar - Jan 20
String Online Quiz Questions Answers 2 Lalit Kumar - Jan 20
SQL Online Quiz Questions Answers 2 Lalit Kumar - Jan 18
Android Online Quiz Questions Answers 2 Lalit Kumar - Jan 17