practcieE1

practcieE1 - CSE 110 Practice Exam 1 1. How many unique...

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

View Full Document Right Arrow Icon
1 CSE 110 Practice Exam 1 1. How many unique combinations of 6 bits are there? ____________ 2. Represent 55 in binary? ____________________ 3. What does a compiler do? (a) Translates machine instructions to higher level languages (b) Translates programs written in a high level language into machine code . (c) Translates user programs to Java Programs (d) None of the above 4. Consider the following Java Program public class VendingMachine { public static void main(String[] args) { Sys tem.out.println(“Please insert 25c”); } } By what name would you save this program on your hard disk? 5. Give the output of the following program: public class MethodExample { public static void main(String args[]) { int y = 2, z = 1; z = y * 2; System.out.print(y + z); } } 6. Consider the following program: public class Exam1 { public static void main(String []args) { String str = new String("Arizona state university"); char ch1 = str.toLowerCase().toUpperCase().charAt(0); char ch2 = str.toUpperCase().charAt(8);
Background image of page 1

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

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

This note was uploaded on 04/18/2011 for the course CSE 110 taught by Professor Kim during the Fall '08 term at ASU.

Page1 / 3

practcieE1 - CSE 110 Practice Exam 1 1. How many unique...

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