Question

In: Computer Science

Name three types of errors that are likely to occur inprograms:Which one of these...

  1. Name three types of errors that are likely to occur in programs:

Which one of these would apply to the following:

  1. A semicolon left off the end of a statement


  1. Using the following statement in a program:

Average = 10 + 20 + 30/3;


  1. Trying to take the square root of a negative number


  1. Forgetting to include the

    library and then using the thee following statement:

cout<<”Please enter a number “<<endl;

Solutions

Expert Solution

a.
A semicolon left off the end of a statement gives "compile time error"

b.
Average = 10 + 20 + 30/3;
The above statement gives logical error.
It should be like below
Average = (10 + 20 + 30)/3;

c.
Trying to take the square root of a negative number gives logic error.

d.
Forgetting to include the  library and then using the thee following statement 
gives compile-time error


Related Solutions

About errors that can occur in the process of meiosis, and several types of errors are...
About errors that can occur in the process of meiosis, and several types of errors are mentioned. Select of these types of errors (e.g. chromosome number, non-disjunctions, etc.) and provide a brief description of the error. Then do a little bit of online research related to the type of error and identify and describe one disease or condition that can result from this type of error (example – Trisomy 21 is where there is an extra chromosome in the 21st...
True or False: Three types of errors can occur in significance testing. A type I error...
True or False: Three types of errors can occur in significance testing. A type I error results from rejecting Ho when it is true. A type II error results from failing to reject Ho. A type III error results from a statistic student not reading the textbook, reviewing their notes and summary questions, correcting old quiz and exam questions for the Final Comprehensive Exam
What is a payroll master file? Describe the types of errors that may occur in the...
What is a payroll master file? Describe the types of errors that may occur in the master file and how they get there. How would you design payroll procedures to help prevent them?
Describe types of rater errors that can occur during performance review conversations?
Describe types of rater errors that can occur during performance review conversations?
Listed below are types of errors and fraud that might occur in financial statements and audit...
Listed below are types of errors and fraud that might occur in financial statements and audit procedures. Match the error or fraud with the audit procedure that is most likely to detect the error or fraud. AUDIT PROCEDURES: a.Reviewing unusual transactions during the year. b.Comparing subsequent cash payments to the accounts payable trial balance. c.Comparing subsequent cash payments to the accounts payable trial balance. d.Reviewing unusual transactions during e.Reviewing union contracts Error or Fraud Audit Procedure 1. The existence of...
Listed below are types of errors or fraud that might occur in financial statements. Although a...
Listed below are types of errors or fraud that might occur in financial statements. Although a number of audit procedures might detect an error or fraud, select the most likely effective audit procedure to each error or fraud item. Replies may be used more than once. Audit Procedure a. Preparing and verifying a schedule of bank transfers. b. Tracing remittance advices to postings in the accounts receivable records. c. Comparing the serial numbers of securities on hand to numbers recorded...
Name three types of ways corruption of science can occur. Given a scenario/example to support each...
Name three types of ways corruption of science can occur. Given a scenario/example to support each way.
Name two types of protein modification that can occur in the ER but not in the...
Name two types of protein modification that can occur in the ER but not in the cytosol.
Describe two types of computational errors that can occur in financial calculations and discuss (150 to...
Describe two types of computational errors that can occur in financial calculations and discuss (150 to 180 words) strategies to avoid and detect errors.
1. Define and explain these types of errors that may occur in sensors: Offset, scale, nonlinearity,...
1. Define and explain these types of errors that may occur in sensors: Offset, scale, nonlinearity, hysteresis. Give an example.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT