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]
3 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]3 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
What would be the purpose of grouping worksheets in a workbook?
Nikolay [14]

Answer: A

Explanation:

3 0
3 years ago
What kind of network is built around the concept of low-power transmitters built on towers that can use the same radio frequency
marishachu [46]

Answer:

Cellular telephone network

Explanation:

Cellular telephone network utilizes the concept of the such towers that allows the use of transmitters of low power and make use of the same channel for the radio frequency.

Cellular network is the network for communication in which the end link of the network is wireless. This type type of network is distributed and makes use of the radio waves over the land areas of the network referred to as the 'cells'. These cells are served individually by the fixed base station that enables the transmission of calls over a wide range through wireless links to a fixed receiver

4 0
4 years ago
What is known as the global network of computers?
Rudik [331]

Answer:

b. internet

Explanation:

cuz just b

7 0
2 years ago
Read 2 more answers
How does a main program recieve info from a function in c++?
Mashcka [7]
Main() is a user defined function from where execution of C/C++ programs start. It is the designated entry point to a program that is executed in an operating system. There must be at least one main() function in e<span>very C++/C program. A main program receive info from another function by writing the command int and then the name of the function and the parameters.</span>
8 0
3 years ago
What coding scheme contains a set of 128 numeric codes that are used to represent characters in the computer's memory?
Neko [114]

ASCII is a 7-bit coding, ie., 2^7 = 128 codes.

4 0
3 years ago
Other questions:
  • What is a URN (include example)
    13·1 answer
  • A self-confident person knows that:
    13·1 answer
  • Cuales Son las características de la máquina analítica de Carlos Babbage ?
    11·1 answer
  • This is for being Weird!
    15·2 answers
  • What Are the Components of a Web Address? *​
    14·2 answers
  • What changes have occurred over the last 25 years impacting how we use information systems and that increasingly require using e
    7·1 answer
  • Match each code snippet to its appropriate markup language name
    12·1 answer
  • Look at the following partial class definition, and then respond to the questions that follow it:
    12·1 answer
  • Computer science - algorithms - flowcharts
    11·1 answer
  • What is the minimum amount of hard drive space required for a 64-bit Windows 10 installation?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!