1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
solong [7]
3 years ago
8

1. Mark the following statements as true or false. A. Division by zero is an exception while opening an input file that does not

exist is not an exception. B. Suppose you use the assert function to check if certain conditions are met. If the conditions are not met, then the assert function terminates the program. C. One way to handle an exception is to print an error message and exit the program. D. All exceptions need to be reported to avoid compilation errors. E. Every try block must have a catch block. F. The order in which catch blocks are listed is not important. G. If an exception is thrown in a try block, the remaining statements in that try block are executed after executing a catch block. H. In C , an exception is a value. I. The class invalid range deals with the string subscript out of range error. J. In C , any class can be considered an exception class. K. The exception class must contain at least one member. L. An exception can be caught either in the function where it occurred, or in any of the functions that led to the invocation of the method. M. When the function call stack is unwound, the function in which the exception was not caught terminates, but the memory for its local variables remains allocated.
Computers and Technology
1 answer:
Lilit [14]3 years ago
7 0

A. Division by zero is an exception while opening an input file that does not exist is not an exception.

False. The given except is not related to file operation

B. Suppose you use the assert function to check if certain conditions are met. If the conditions are not met, then the assert function terminates the program.  

True. Yes, it terminates by giving error message

C. One way to handle an exception is to print an error message and exit the program.  

True. Yes, it is one of the safe way to handle exception and stop the program smoothly

D. All exceptions need to be reported to avoid compilation errors.

False. Exceptions are related to run time.

E. Every try block must have a catch block.  

True. A “try block” needs to have catch block but “finally” is optional. There can be more than one catch block for a single “try block”.

F. The order in which catch blocks are listed is not important.

False. It is important to have a good programming skill. If you place the  “Exception class” which is the base for all the other types of exception in the top of catch list then, no other specific exception will get caught which is a very bad programming.

G. If an exception is thrown in a try block, the remaining statements in that try block are executed after executing a catch block.  

False. “Try block” will not get executed.

H. In C , an exception is a value.

True  

I. The class invalid range deals with the string subscript out of range error.

True.

J. In C , any class can be considered an exception class.  

False

K. The exception class must contain at least one member.  

ans: True

L. An exception can be caught either in the function where it occurred, or in any of the functions  

that led to the invocation of the method.  

True. But it is always better to catch exception in the same function.

M. When the function call stack is unwound, the function in which the exception was not caught terminates, but the memory for its local variables remains allocated.

True

You might be interested in
When talking about the physical elements of the internet, the term redundancy refers to:?
Sphinxa [80]
It refers to the physical elements of the internet
6 0
3 years ago
In three or four sentences, describe how a person buys and sells stock.
Aleksandr-060686 [28]
In order to buy stock, you must go and find a stock broker. You do not always need a broker, but it is more convenient to have one to manage your stock. It also makes your life in the market easier. The broker will manage your shares and you tell him when you want to buy or sell your stock.
4 0
3 years ago
Read 2 more answers
Select the correct answer. Which input device uses optical technology?
daser333 [38]

Answer:

barcode reader is the correct answer

8 0
3 years ago
Based on​ Sam's description of an information​ system, all of the following are components of an IS except​ _____.
svetoff [14.1K]

Answer:

the answer is A

Explanation:

My smartness

5 0
3 years ago
...............................
Gemiola [76]

............................

Mark me brainliest^^

7 0
2 years ago
Read 2 more answers
Other questions:
  • How long does it take a letter to arrive?
    9·1 answer
  • When did the digital revolution begin
    10·1 answer
  • How do optical discs store data? select one:
    15·1 answer
  • Write a program with a method computeCommission which takes a double that is the salesAmount and returns the commissions for sal
    9·1 answer
  • I know how to design it but I’m confused as to how to write a function code based on the info provided.
    10·1 answer
  • When you touch a hot stove, along which pathway will the impulses travel and what is the final destination in the cns?
    12·1 answer
  • Which of the following is one of the options available on the Columns menu on the
    6·1 answer
  • In a word-processing program, what are the easily accessible icons that allow you to print, save and change fonts with a click o
    8·1 answer
  • The other term for template document is _______.
    13·2 answers
  • a company recently implemented a secure sockets layer/transport layer security (ssl/tls) version that supports secure hashing al
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!