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
2. What is “suspension of disbelief?” Which form of immersion is it most closely associated with?
jonny [76]
What are the answer choices
4 0
3 years ago
Read 2 more answers
In the output at the command line from a router that reads - ip ospf message-digest-key 1 md5 CISCO-123 - what does the CISCO-12
11111nata11111 [884]

Answer: a) it is used as a password.

Explanation:

In order to be able to exchange routing information , CISCO routers use an authentication process, so when they send a message (a HELLO message for instance) the router that receives the message confirms that the message is authentic.

There are several types of authentication in OSPF, null, plain  and MD5.

The difference between them is as follows:

1) null, implies that no password is included in the packet header, it's the default mode.

2) plain: In this type of authentication, the password is sent transparently from a router to his neighbor, as a plain text which makes it vulnerable to attacks from packet inspection software, like Sniffer.

3) MD5, is a more secure mode, in which the password is not sent directly, but a hash built based on the packet contents and the password itself instead.

MD5 (Message Digest 5) is the name of the algoritm used to build the hash that receiver will compare with the sent by the sender in order to confirm authentication.

The chosen password, is placed at the end of the command, after the type of authentication (MD5 in this case), which in this case is "CISCO-123".  

7 0
3 years ago
In which of the following situations is having a good credit score important?
Triss [41]
<span>The correct answer is to be able to loan from banks. Having a good credit score, impacts one's approval for bank loans. It will enable a person to have a higher chance of getting his or her loan, approved by the banks, than those who have low credit scores. </span>
8 0
3 years ago
How do you add a simple header that will appear in a single column on the left of a document
malfutka [58]

When adding a header, you need to double tap the top of the document.

4 0
3 years ago
Read 2 more answers
Please Answer these following Question very urgent "file attch"
Tanya [424]

Answer:

1. ∑ numbers=57

Overall ∑ is 57 hence.

And each number is less than 15, and hence they can be represented in 4 bits

However, we cannot write 57 in 4 bits.

However, 111001 is 57 in binary, and it is as well greater than 4 bits.

Hence, we are adding the two extreme left bits to right 4 bits as mentioned below.

Left are 11, right bits are 1001

1001

   11

1110 is the checksum

=14 and this is 14 bits.

2. The degree of given polynomial is 3, and hence,

The divisor is X3+1 =1001

Original data word=10110

Since the size of CRC is 3 bits, we should place 3 zeros to the right of the original data

And thus we get,  

10110000

         10100

1001√10110000

         1001

         00100000

         1001

         --------------

         0100   CRC

We send our data 10110 its reminder (CRC) will be added with it like 10110100

Receiver will receive 10110100 with same divisor 1001

         10100

1001√10110100

         1001

---------------------------

         01001

           1001

--------------------------------

           000

And since the last 3 bits are zero, and hence its error free.

3.

At 7 and 5 we have 1 and similarly in 2nd at 8, 4 and 0

  Bits    Polynomial

1010000        X7+X5+0

10001001 X8+X4+1

Explanation:

Please check answer.

3 0
3 years ago
Other questions:
  • A smart refrigerator can use _____ to detect when you are running low on milk, and then send a reminder to you on a wireless net
    14·1 answer
  • The trigonometry book says: sin^2(t) + cos^2(t) = 1 Write a Python program that verifies the formula with the help of the Python
    11·1 answer
  • Describe the functions of ALU, resisters, CU, BIU, Cache and FPU.
    7·1 answer
  • Write a script that checks to see if at least one argument has been given on the command line and tests whether the argument is
    5·1 answer
  • For this assignment your are to implement the Pet Class described in Programming Exercise 1, starting on page 494 in our textboo
    6·1 answer
  • Write a method for the Invitation class that accepts a parameter and uses it to update the address for the event.
    9·1 answer
  • PLS HURRY<br> Look at the image below
    8·1 answer
  • Mha lovers why do other anime lovers report mha lovers for not liking there anime?
    6·2 answers
  • MSWord is a popular___________ program.​
    7·2 answers
  • Use the function varimp() on the output of train() and save it to an object called imp:_____.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!