You should state the language you're using in these types of questions; here's an example in C++.
bool onOff = true;
if (onOff)
onOff = false;
else
onOff = true;
Answer:
a) "Quit"
c) "Q only
Explanation:
Given
<em>String s = "Go"; </em>
<em>while ((!s.equals("q"))&& (!s.equals(""))) {</em>
<em>System.out.println("In loop"); </em>
<em>s = scnr.next();</em>
<em>}</em>
<em />
Required
What input causes another execution
Analyzing the while condition
<em>while ((!s.equals("q"))&& (!s.equals(""))) </em>
<em />
This can be split into:
<em>!s.equals("q")) && (!s.equals(""))</em>
<em />
Meaning
When s is not equal to "q" and when s is not an empty string
<em />
In other words,
the loop will be executed when user input is not "q" and user input is not empty.
So, from the list of given options: The loop both will be executed when:
a) Input is "Quit"
c) Input is Q only
<em>Input of q will terminate the loop, hence b and d are incorrect</em>
<em />
Answer:
Number of feet in a mile
Explanation:
In this problem, we need to find an option that to be created as a constant variable.
In option (a) "number of feet in a mile".
As 1 mile = 5280 foot
The number of feet in a mile is constant in every condition.
In option (b), (c) and (d)
number of people inside a store
, current grade in a class
, score in a football game are no fixed. It is not created as a constant variable.
Hence, the correct option is (a).
Answer: Question 1 is A Question 2 is C
Explanation:
Answer:
V44 uses Lempel-Ziv-Welch encoding to compress data.
Explanation:
Lempel–Ziv (LZW) created by Abraham Lempel and Jacob Ziv is a universal lossless data compression algorithm. It is an improvement of LZW algorithm.
It makes use of LZ78 algorithms. This algorithm achieve its compression by taking out repeated occurrences of data with references to a dictionary that is built based on the data stream it received as input.
Also, its dictionary pre-initialized with all available possible characters and symbols.