What is the output of:
System.out.println("Compsci" + "is fun.");
Compsciis fun.
What is the output of:
int x = 9;
System.out.println(++x + " " + x++);
10 10
LinkedList implements which interface, which is also inherited by the Deque interface?
Queue
Who was the co-founder of Microsoft?
Paul Allen
What are the WICS officers' names?
Gardenia, Riya, Catherine
What is the output of:
if (gardeniaWearingPink == true) {
System.out.print("pink fluffy unicorns!");
If she is: pink fluffy unicorns!
If she is not: no output
What is the output of the code below?
boolean a = true;
boolean b = false;
int count = 0;
if (a ^ b) count++;
if (b || a && b) count++;
if (a && !a) count++;
System.out.println(count);
1
What type of data structure contains a "previous" and/or "next" pointer(s) that point to nodes before and after it in a chain?
LinkedList
Name a company that began in a garage.
(Any work) Microsoft, HP, Apple
Name a palindrome word
What is the output of:
int month = 3;
String monthString;
switch (month) {
case 11: monthString = "November";
break;
case 12: monthString = "December";
break;
default: monthString = "Invalid month";
break;
}
System.out.println(monthString);
Invalid month
Convert the following decimal (base 10) number to hexadecimal (base 16): 438
1B6
What would be the NEXT item popped?
//assume x is an empty stack
x.push(3);
x.push(8);
x.pop();
x.push(7);
x.push(9);
x.pop();
7
The first computer mouse was made of...
Wood!
Which planet spins the fastest?
Jupiter
What is the output of:
System.out.println("hello \n world");
hello
world
Given the following function:
public static int someFunction(int i) {
if (i <= 1) return i;
else return someFunction(i - 1) + someFunction(i - 2);
}
Find someFunction(7).
13
If a tree has n nodes, how many edges does it have (in terms of n)?
n - 1
3 Stanford students came together and created which app?
Snapchat
What are baby rabbits called?
Kits
What is the output of:
double x = 1.0/3;
System.out.printf("%.2f", x);
0.33
Evaluate the following postfix expression (assuming all single digit numbers):
6 7 + 8 - 4 2 / ^
25
What is the time complexity of adding to a HashSet?
O(1)
What was the first computer-based music game created in 2005?
Guitar Hero
What is the only English word ending with "mt"?
Dreamt