Question: USING C++ Lab Assignment 12: Exception Handling Q1 Write a program that prompts the user to enter a length in feet and inches and outputs
USING C++

Lab Assignment 12: Exception Handling Q1 Write a program that prompts the user to enter a length in feet and inches and outputs the equivalent length in centimeters. If the user enters a negative number or a nondigit number, throw and handle an appropriate exception and prompt the user to enter another set of numbers. Q2 Following program is crashing at the runtime due to the bad memory allocation. C++ new operator throws an exception object of bad alloc class, so that we can catch it. So rewrite this program by using try, catch blocks to catch the exception and print an appropriate message. #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
