this is NOT homework.. can some atleast tell me how many I got wrong? appreciate it.
I'm also curious on problem #2 shouldn't it read: Overloading "Having multiple functions with identical names but different parameter lists" ??
thanks
1.
Code:
var i = 7;
while(i % 3 != 0){
i += 7;
}
print(i);
What value will be printed?
21
2. Overloading is
a) Running the computer out of memory
b) Having multiple functions with identical names but different arguments
c) Having multiple threads access one memory address at the same time
d) Assigning a new data type to a variable
e) Redefining a function of a parent class in a child class
B
3. int integer = 5;
print(++integer * integer--);
What value will be printed?
36
4. A recursive function MUST have....
a) A call to itself e) Polymorphism
b) A return value f) All of the above
c) An exit condition g) A and C
d) Inheritance
G
5. Normally, which corner of a frame (window) is considered (0,0)?
a) Top Left c) Bottom Left
b) Top Right d) Bottom Right
A
6. The result of
Code:
i = ((int)((string)((int)"7")+"5"))
a) An integer i, where i = 12 c) A String, i where i = 75
b) A String, i where i = 12 d) An integer i, where i = 75
D
7. Which of these is not a real differentiator for programming languages?
a) Object-oriented / Process-Oriented e) All of the above
b) Interactive / Automated f) B and C
c) Interpreted / Compiled g) B and D
d) Strongly-Typed / Weakly-Typed
B
8.
Code:
int i;
int j = 0;
for (i=100; j<5; i=i)j = 100-(i-=1);
Print i;
What is the final value of i = 95
and how many times is i printed? one time
9. What is the logical operation X if it behaves as follows:
True X True = False
True X False = True
False X True = True
False X False = False
a)AND c)OR
b)NOT d)XOR
D
10. What data structure has a single pointer to node and in terns, that node has a single pointer to an inner node?
a) (Singly) Linked List
b) Doubly Linked List
c) Tree
d) Dictionary
e) Two-Dimensional Array
D