1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
valentinak56 [21]
4 years ago
9

Consider this program segment: int newNum = 0, temp; int num = k; // k is some predefined integer value 0 while (num > 10) {

temp = num % 10; num /= 10; newNum = newNum * 10 + temp; } System.out.println(newNum); Which is a true statement about the segment? I If 100 <= num <= 1000 initially, the final value of newNum must be in the range 10 <= newNum <= 100. II There is no initial value of num that will cause an infinite while loop. III If num <= 10 initially, newNum will have a final value of 0.
Computers and Technology
1 answer:
Doss [256]4 years ago
6 0

Answer:

All of these statements are true.

Explanation:

Since the while loop is reversing the integer number and leaving the highest order digit in the num and stores the reversed number in the newNum variable.

It skips one digit so if the num is in the range of [100,1000] it will result in a number between 10 and 100.

This loop can never go in infinite loop for any initial value of num because the loop will run as many times as the number of digits.

and if the value of the num is <=10 the while loop will never run and the value of newNum will be 0.

You might be interested in
Which of the following best describes a hacktivist? Select one: a. An individual who attempts to destroy the infrastructure comp
brilliants [131]

Answer: (B) An individual who hacks computers or Web sites in an attempt to promote a political ideology

Explanation:

 Hacktivist is the defined as an individual that basically hacks the various types of web sites and computer system for promoting the various political ideologies. The hacktivists is the method which include the DDOS attacks (Distributed denial of services).

It basically causes various website and the email with the congestion of traffic with the computer virus and by the data stealing. The denial of services attacks typically considered federal crime and illegal in united state.  

4 0
4 years ago
Order the following routine maintenance tasks from most to least important when securing a computer. a. Verify anti-malware sett
spin [16.1K]

Answer:

The following are the order of the routine maintenance tasks that is C, A, B, D

Explanation:

For securing the computer system the user has to follow some steps related to the routine maintenance tasks.

  • Firstly, the user has to validate the settings on the Windows Update.
  • Then, they have to validate the settings on the anti-malware software.
  • Then, the user has to validate the setting related to the file-sharing system.
  • Finally, they have to validate the frequent optimization of hard drives or hard disks.
7 0
3 years ago
Answer 1 question and get 10 points in return
AlekseyPX

Answer:

3

Explanation:

sorry if I'm wrong...it's been a while since I took a coding class.

5 0
3 years ago
Read 2 more answers
Write a loop to print 56 to 70 inclusive (this means it should include both the 56 and 70). The output should all be written out
IRINA_888 [86]

Answer:

for i in range(56,71):

   print(i)

Explanation:

By the range 56 to 71 it means that for loop will run when i=56 to i=71, but the upper bound is one less than the upper bound, and which is 70. So the above loop will print integers from 56 to 70.

And the above code is in Python.

4 0
3 years ago
Who is the intended audience of a pseudocode document?
cluponka [151]

Answer and Example:

Pseudocode is an artificial and informal language that helps programmers develop algorithms.

Pseudocode is a "text-based" detail (algorithmic) design tool. The rules of Pseudocode are reasonably straightforward. All statements showing "dependency" are to be indented.

Pseudocode is understood by the programmers of all types. it enables the programmer to concentrate only on the algorithm part of the code development.

Java would use this.

3 0
3 years ago
Other questions:
  • What keyboard shortcut keys selects cell A1
    12·1 answer
  • What does the key combination ctrl+s achieve?
    7·2 answers
  • What do people in japan use to make anime
    5·1 answer
  • Help i give 20 shekel
    9·1 answer
  • If wire rope guard rails are used what must also be done?
    10·1 answer
  • I just wanna promote my 2 yt channels c: <br> (the channels are in the comments of this question)
    14·1 answer
  • Alright, so I have a wireless mouse that uses a dongle (it's not Bluetooth nor wired). But recently I realized that none of the
    12·1 answer
  • Selling R frog for 50 r-obux on r-oblox!!! dont answer if u not gonna buy it
    15·2 answers
  • Speed and security are advantages generally associated with<br> networks.
    9·1 answer
  • Take values of length and breadth of a rectangle from the user and check if it is square or not.
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!