COMP 248 Midterm: COMP 248 Midterm 2011 Fall A

251 views4 pages
31 Jan 2019
Department
Course
Professor

Document Summary

Comp 248 ee test 1 - a. Only encs-approved calculators (with the encs sticker) are allowed. No other electronic devices (including cell phones) are allowed. No books, papers or extra notes are allowed. Question 1 (6pts) assume that you need a variable named big to represent an integer greater than 2,147,483,647 (i. e. > 232-1-1). Recall that in java, the type int is stored in 32 bits; so you can only store integer values within the range. Question 2 (8pts) assume that the variables x, y and z have been properly declared. A- (15pts) for each of the following expressions, indicate their value and their type: B- (15pts) for each of the following statements, indicate : if there is a syntax error, or if there is no error, indicate the value of the variable a, after the statements are executed. Question 4 (16pts) assume the following declarations : char c1, c2, c3;