IU Bloomington Evaluation Services and Testing

Indiana University
Bloomington Evaluation Services and Testing

QuizSite  Students
Quizzes · Tests · Evaluations · Surveys
Activity: Practice_One
Student: dgerman (Adrian German)
Instructor: dgerman
Course: J201 Section: 4285
Question 1.
What is the output produced by the following three lines (when correctly embedded in a complete program)?
int x, y;
x = 2; y = 3;
y = x;
System.out.println(x + y); 
Please type your answer in the following box:


Question 2.
What is the output produced by the following three lines (when correctly embedded in a complete program)?
int x, y;
x = 2; y = 3;
y = x;
System.out.println(x + " versus " + y); 
Please type your answer in the following box:


Question 3.
What is the output produced by the following two lines (when correctly embedded in a complete program)?
int x, y;
x = 2; y = 3;
System.out.println("1" + x + y); 
Please type your answer in the following box:


Question 4.
What is the output produced by the following two lines (when correctly embedded in a complete program)?
int x, y;
x = 2; y = 3;
System.out.println("1" + (x + y)); 
Please type your answer in the following box:


Question 5.
What is the output produced by the following two lines (when correctly embedded in a complete program)?

Please note that the variables are of type char.

char a, b, c;
a = 'B'; b = 'C'; c = a;
System.out.println(a + c + 'C'); 
Please type your answer in the following box:


Question 6.
What is the type of this expression?
5 * (7 + 4 / 2)
Please type your answer in the following box:

(Please use the Java keyword for the type).


Question 7.
What is the type of this expression?
i != 3
Please type your answer in the following box:

(Please use the Java keyword for the type. Also, assume i is a double).


Question 8.
What is the output produced by the following two lines (when correctly embedded in a complete program)?

Please note that the variables are of type int.

int a, b;
a = 12; b = 5;
System.out.println(a / b); 
Please type your answer in the following box:


Question 9.
What is the output produced by the following two lines (when correctly embedded in a complete program)?

Please note that the variables are of type int.

int a, b;
a = 12; b = 5;
System.out.println(a % b); 
Please type your answer in the following box:


Question 10.
What is the output produced by the following two lines (when correctly embedded in a complete program)?

int a; a = 'C' - 'A';
System.out.println(a); 
Please type your answer in the following box:


Click to submit your answers.   Help


This activity is available between these dates and times: 07.08.10:00-08.11.19:59
It can be submitted a total of 30 times.
If it is a scored activity, the highest non-zero score will be counted.


Screen: TAKE_QUIZ
Last updated: Thu Mar 8 13:40:07 2001
URL: https://www.indiana.edu/~best/cgi-bin/quizsite/students.pl
Comments: best@indiana.edu
Copyright 2000, BEST & The Trustees of Indiana University