Exam2_Review.4

Exam2_Review.4 - CPSC 121 Exam 2 Review d. declare a new...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CPSC 121 Exam 2 Review d. declare a new name for an existing variable e. None of the above Short answer 19. What is wrong with this code fragment? ___________________________________________________________________________________ ___________________________________________________________________________________ ___________________________________________________________________________________ ___________________________________________________________________________________ try { //some code goes here } catch(…) { cerr << “Exception!\n”; keep_window_open(); return 1; } catch(const logic_error& e) { cerr << “Logic error: “ << e.what() << “\n”; keep_window_open(); return 2; } 20. Write a function (call it swapie( )) that takes two doubles as arguments and swaps their values; i.e., if x == 14 and y == 7 before you call swapie( ), then after you call swapie( ) x == 7 and y == 14....
View Full Document

This note was uploaded on 02/18/2012 for the course CSCE 121 taught by Professor Walter daugherity during the Fall '09 term at Texas A&M.

Ask a homework question - tutors are online