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
Luba_88 [7]
3 years ago
11

Consider the following code:

Computers and Technology
1 answer:
Volgvan3 years ago
8 0

Answer:

The code will get stuck in an infinite loop.

Explanation:

Since val is decreasing by 1 each time it meets the criteria of being smaller than 10, your code will get stuck in an infinite loop since val will always be smaller than 10.

Hope this helps :)

You might be interested in
For his class project, Matt has to create an image in a color scheme that has shade or tint variations of the same hue. Which co
Alex

Answer:

B.Monochromatic

Explanation:

mono means one

5 0
3 years ago
Consider the partially-filled array named a. What does the following loop do? (cin is a Scanner object)int[] a = {1, 3, 7, 0, 0,
boyakko [2]

Answer:

Option 1: May crash at runtime because it can input more elements than the array can hold

Explanation:

Given the code as follows:

  1.        int[] a = {1, 3, 7, 0, 0, 0};
  2.        int size = 3, capacity = 6;
  3.        int value = cin.nextInt();
  4.        while (value > 0)
  5.        {
  6.            a[size] = value;
  7.            size++;
  8.            value = cin.nextInt();
  9.        }

From the code above, we know the <em>a</em> is an array with six elements (Line 1). Since the array has been initialized with six elements, the capacity of the array cannot be altered in later stage.

However, a while loop is created to keep prompting for user input an integer and overwrite the value in the array started from index 3 (Line 4- 9). In every round of loop, the index is incremented by 1 (Line 7). If the user input for variable <em>value</em> is always above zero, the while loop will persist.  This may reach a point where the index value is out of bound and crash the program. Please note the maximum index value for the array is supposedly be 5.  

8 0
3 years ago
Which behaviors might lead someone to have a low credit score?
stepladder [879]
A is the correct answer. You build credit by using credit cards and paying your bills on time.
4 0
3 years ago
What percent of records are temporary, if you are not in the OSD?​
3241004551 [841]

Answer:

Headed by the OSD Records Administrator, the OSD Records and Information Management (RIM) Program is responsible for oversight, implementation of the Federal Records Act within the Offices of the Secretary of Defense and the WHS supported Defense Agencies and Field Activities.

Explanation:

6 0
3 years ago
Which selections are possible for controlling the start time of audio playback? Check all that apply. Automatic Rewind when done
sergij07 [2.7K]

Trim audio on click would be your answer

5 0
3 years ago
Other questions:
  • I just started game development using unity, I’m trying to control my sphere moving on a flat surface using the W,A,S,D keys, if
    11·1 answer
  • Fuel-pressure regulators on fuel-return-type fuel-injection systems are installed
    8·2 answers
  • I just want to ask if some one know an online school program that offer a live session and the cost of it not to expensive. for
    10·1 answer
  • A slide in a presentation program can have which of the following?
    5·2 answers
  • All of the following are challenges presented by changing technology as it relates to the special events field EXCEPT: A. the ab
    13·1 answer
  • In rolling a die four times, what is the odds that at least one 5 would appear?
    6·1 answer
  • If you delete a shortcut from your desktop, have you also deleted the original file?
    11·2 answers
  • 4.3 Code Practice: Question 1
    12·2 answers
  • 1. This tab displays the related commands which are grouped as Pages, Tables, Illustrations, Links, Header and Footer, Text, Sym
    13·1 answer
  • which one of the following will reach every element in the array a? 1. for(int i = 0; i &lt;= a.length; i++) 2. for(int i = 0; i
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!