Your answer would be A. Architects
Answer:
The program displays 5 4 3 2 1 and then raises an Array Index Out Of Bounds Exception.
Explanation:
A sample of code output is attached.
The code snippet contain xMethod that takes an array and array length as argument.
In the given snippet, the array {1, 2, 3, 4, 5} and length (5) is passed as argument to the method.
First the method display the element of the array in reverse order
System.out.print(" " + x[length - 1]);
and then the method call itself again. This displays
5 from x[4]
4 from x[3]
3 from x[2]
2 from x[1]
1 from x[0]
but after displaying 1, when it tries to call the method again, an array index out of bound exception is thrown because it will try accessing an element from the array when it is already exhausted.
Answer:
Global variable
Explanation:
You should avoid using global variables in a program because global variables can be accessed by any part of the code and every function or any part of the code has the tendency to alter or modify its value. One can't limit the scope or in other words one cant simply force any part of the program not to use them or modify it's values. Testing of large programs also becomes difficult as it is hard to keep track of the functions reading and modifying the values of global variables
Answer: See explanation
Explanation:
Computer hardware simply refers to the part of the computer that we can see and also touch. This includes the mouse, keyboard, monitor, central processing unit, monitor etc.
The computer software simply refers to the set of instructions which are used in the operation of the computer. It includes the application programs, operating system etc.
Answer:
Given:
Passwords are selected from 4 characters.
Character combinations are 26 lower case alphabetic characters.
Passwords attempts by adversary is at rate of 1 second.
To find:
Expected time to discover the correct password
Explanation:
Solution:
4 character combinations of 26 alphabetic characters at the rate of one attempt at every 1 second = 26 * 4 = 104
So 104 seconds is the time to discover the correct password. However this is the worst case scenario when adversary has to go through every possible combination. An average time or expected time to discover the correct password is:
13 * 4 = 52
You can also write it as 104 / 2 = 52 to discover the correct password. This is when at least half of the password attempts seem to be correct.