Exam 3: Program Correctness and Efficiency

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

If you attempt to de-reference a(n) __________ pointer, the operating system will generally issue an error message and terminate the program.

Free
(Short Answer)
5.0/5
(37)
Correct Answer:
Verified

null

The for loop below is O ( __________ ). The for loop below is O ( __________ ).

Free
(Multiple Choice)
4.8/5
(33)
Correct Answer:
Verified

C

Debugging is the major activity performed by programmers during the testing phase.

Free
(True/False)
4.8/5
(32)
Correct Answer:
Verified

True

Using a debugger to execute in increments as small as one program statement is called __________ execution.

(Short Answer)
4.8/5
(34)

A program that executes a series of tests and reports the results is known as a test __________.

(Multiple Choice)
4.8/5
(45)

If we have an O(2n) algorithm that takes an hour for 100 inputs, adding 10 more inputs will add __________ hours to processing time.

(Short Answer)
4.9/5
(37)

An O(n2 ) algorithm is never more efficient than an O(n log n) algorithm.

(True/False)
4.9/5
(41)

C++ allows you to define an exception handler that will catch all exceptions by using __________ as the exception handler parameter.

(Multiple Choice)
4.9/5
(40)

In __________ testing, we are concerned with the relationship between the unit inputs and outputs.

(Short Answer)
4.9/5
(33)

Consider the set of statements below: Consider the set of statements below:   Since you would normally declare average as a(n) __________ value, you cast an int value in sum to type double before doing the division. Since you would normally declare average as a(n) __________ value, you cast an int value in sum to type double before doing the division.

(Multiple Choice)
4.8/5
(35)

You can insert code in your program that throws an exception when a particular kind of error occurs.

(True/False)
4.9/5
(23)

Which of the following assertions correctly captures the error of passing a negative number to the fib function defined below? Which of the following assertions correctly captures the error of passing a negative number to the fib function defined below?

(Multiple Choice)
4.8/5
(40)

To avoid uncaught exceptions you write a(n) __________block that can throw an exception and follow it with a catch block that actually catches an exception and handles it.

(Short Answer)
4.8/5
(39)

If we can see how an algorithm's execution time increases with respect to n, we can compare two algorithms by examining their __________.

(Multiple Choice)
4.7/5
(31)

Industrial experience has shown that the use of structured walkthroughs is ineffective in detecting errors and removing defects.

(True/False)
4.8/5
(42)

The compile time function sizeof() returns the size of its argument in __________.

(Short Answer)
4.8/5
(35)

In the context of integration testing, the word __________ is used to represent a function, a class, or a collection of classes.

(Short Answer)
4.8/5
(30)

Given the need to test five if statements that are not nested, full path coverage could require up to __________ test cases.

(Multiple Choice)
4.9/5
(30)

__________ errors occur during program execution.

(Short Answer)
4.9/5
(40)

The standard exception classes derived from class exception all have a member function named __________.

(Multiple Choice)
4.8/5
(38)
Showing 1 - 20 of 25
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)