


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



Professor Jodi Neely-Ritz Signature: _______________________
1. Write a function for an integer division with exception handling. The exception should handle the case when the denominator is 0. Answer: int a,b,excep; //enclose within main: try{ if (b==0) throw excep; } catch excep { cout<<”divide by 0 attempoted”; } // 10 2. what is the output of the following code. #include
Professor Jodi Neely-Ritz Signature: _______________________ return(x+rec(x-1)); }
Professor Jodi Neely-Ritz Signature: _______________________ #include