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 can be used to replace internal network addresses with one or more different addresses so the traffic tha
love history [14]

Answer:

A Proxy Server

Explanation:

In data communication and computer networks, proxy servers are intermediaries or a gateway that sits between the user and the internet. The users are therefore separated from the web they browse. The proxy servers then provide filters and firewalls.

7 0
3 years ago
WILL GIVE BRAINLIEST AND HALLOWEEN CANDY!!!!!!!!!<br> who wants to talk?
Tamiku [17]
<h2>Sure, I wanna talk. (:      .........................</h2>
3 0
3 years ago
Which routine is configured to execute first when the program runs?
tester [92]
It's D because of ok
4 0
3 years ago
Relational tables need to be​ ______________ to help avoid duplicate data.
Svetlanka [38]
Relational tables need to be DISTINCT to help avoid duplicate data.

Distinct is defined as readily distinguished or recognizably different in nature from something of similar type.

Being distinct is the first integrity rule that a relational table follows. It ensures that the data in the table are always accurate and accessible.
5 0
3 years ago
A(n) ______ system is a set of programs that coordinates all the activities among computer or mobile device hardware. a. managem
madreJ [45]

Answer:

Option c is the correct answer for the above answer.

Explanation:

The operating system behaves like the soul of the system. It is because it is used to operate the system. It is also used to operate all the activities of the system. It is also used to manage the resource and can be available on the computer as well as mobile. This is the first software which needs to install on a mobile or computer because without this no software can work on the mobile or computer.

The above question asks about the software which is used to operate the computer as well as mobile. That software is known as the Operating system. So the answer is Option c while the other is not because:-

  • Option 'a' states about the management which is not software.
  • Option b states about the Network which is also not a software.
  • Option d states about the application which is not used to operate the software of the system.
5 0
3 years ago
Other questions:
  • A company that hires only American Indians is practicing
    5·2 answers
  • Rearrange the statements in the following order so that the program prompts the user to input: a. The height of the base of a cy
    12·1 answer
  • A multistep protocol used to identify and control potential threats to food-safety is the
    8·1 answer
  • What do you need to do in order get paid for ads running on your content?
    11·1 answer
  • Which of the following is a disadvantage of using open source software?
    14·1 answer
  • A _____ is a control that tells the computer what task to perform.
    6·1 answer
  • 3. Which of the following is called address operator?<br> a)*<br> b) &amp;<br> c).<br> d) %
    12·1 answer
  • The following Mic1 microcode excerpt shows support for a possible 7 bit opcode, 8 bit integer argument machine instruction (orga
    14·1 answer
  • Specialization of computer engineering ?<br>​
    7·1 answer
  • Male tiene una bicicleta rosa<br>es biene o es servicio?​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!