cs31f08mid

cs31f08mid - Midterm Practice Problems TA: Brian Choi...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

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

Unformatted text preview: Midterm Practice Problems TA: Brian Choi (schoi@cs.ucla.edu) Section Webpage: http://www.cs.ucla.edu/~schoi/cs31 ENJOY! Problem 1 True False Variable names can begin with an alphabet or a digit. True False A string cannot be empty. True False A character cannot be empty. True False An array can have a size of 0. True False int m = 5.6; wont compile because types do not match. True False int n = 11 / 5; will create n and initialize it with the value of 2. True False An array index begins with 0. True False for (int i = 0; i <= 49; i++) will run the loop 50 times (assuming i is not modified within the loop). True False If there is a function that does not require any parameters, you can omit parentheses when calling it. True False Constant variables can be modified only in the main() function. True False int x = 0; sets x to an integer 0. True False int x = 0; sets x to an integer 0. True False int x = 0.0; sets x to an integer 0. True False int x = 0.5; sets x to an integer 0. True False You will ace the exam....
View Full Document

Page1 / 4

cs31f08mid - Midterm Practice Problems TA: Brian Choi...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online