Answer / Explanation:
195.200.0.0/16
Note: Class C address can not be assigned a subnet mask of /16 because class c address has 24 bits assigned for network part.
2ⁿ = number of subnets
where n is additional bits borrowed from the host portion.
2ˣ - 2 = number of hosts
where x represent bits for the host portion.
Assuming we have 195.200.0.0/25
In the last octet, we have one bit for the network
number of subnets = 2¹ =2 network addresses
number of host = 2⁷ - 2= 126 network addresses per subnets
Answer:
Time Complexity of Problem - O(n)
Explanation:
When n= 1024 time taken is t. on a particular computer.
When computer is 8 times faster in same time t , n can be equal to 8192. It means on increasing processing speed input grows linearly.
When computer is 8 times slow then with same time t , n will be 128 which is (1/8)th time 1024.
It means with increase in processing speed by x factor time taken will decrease by (1/x) factor. Or input size can be increased by x times. This signifies that time taken by program grows linearly with input size n. Therefore time complexity of problem will be O(n).
If we double the speed of original machine then we can solve problems of size 2n in time t.
Answer:
Memory dump in base 16 is human friendly
Explanation:
Hexadecimal numbers are human friendly and hence it is very easy to express the binary number in a more human-friendly as compared to any other base number systems. It is also used to trace errors in the storage
hence, the Architects prefer memory dump to be in base 16
Answer:
words.hasNext()
Explanation:
Given the code snippet below:
- while (inputFile.hasNextLine()) {
- String word = "";
- String line = inputFile.nextLine();
- Scanner words = new Scanner(line);
- while (words.hasNext()) {
- word = words.next();
- }
- System.out.println(word); }
- }
We have a inputFile Scanner object that can read data from a text file and we presume the inputFile has read several rows of data from the text file. So long as there is another line of input data available, the outer while loop will keep running. In each outer loop, one line of data will be read and assign to line variable (Line 3). Next, there is another Scanner object, words, which will take the current line of data as input. To get the last word of that line, we can use hasNext() method. This method will always return true if there is another tokens in its input. So the inner while loop will keep running so long as there is a token in current line of data and assign the current token to word variable. The word will hold the last token of current line of data upon exit from the inner loop. Then we can print the output (Line 8) which is the last word of the current line of data.