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

int i = 0; while (i != 11) { System.out.print(" " + i); int sum = i; i++; sum++; } Group of answer choices It contains the value

11 after the loop is finished executing. It contains the value 10 after the loop is finished executing. It disappears after the loop is done executing. It is the cause of an infinite loop.
Computers and Technology
1 answer:
olga55 [171]3 years ago
6 0

Answer:

The answer to this question can be given as:

In this code, the sum value is 11. Which means It contains the value 11 after the loop is finished executing.

Explanation:

In the given code the firstly an integer variable i declare that assign a value that is 0. Then there is a while loop is define that is starts from 0 and ends with 10. In this loop, we print the value of i and we also declare an integer variable that is the sum. This variable holds the value of the i variable and both variable i and sum in an increment by 1 and the value of i will be 10 and the sum variable will end on 11 numbers. So the answer to this question is It contains the value 11 after the loop is finished executing.

You might be interested in
The domain name is passed to a domain name server, which maps it to the correct IP address, and then the code behind the page is
maxonik [38]
It's an incomplete, therefore wrong, description of "<span>B. Browser using a URL to access a web page"

After the nameserver returns the IP address of the domain, the client machine makes the page request from the IP address. The client's browser parses (reads) the HTML code, makes calls to the server for any other files (href, img and media) and displays the HTML content according to visual specifications in the CSS (Cascading Style Sheet).
</span>
6 0
3 years ago
GoodArray hackerrank solution for a number N, a goodArray is the smallest possible array that consists of only powers of two
Paladinen [302]

Using the knowledge in computational language in python it is possible to write a code that smallest possible array that consists of only powers of two.

<h3>Writting the code in python:</h3>

<em>"public class GoodArray {"</em>

<em />

<em> "public static List<Integer> getQueryResults(long N, List<List<Integer>> queries) {"</em>

<em />

<em>  "List<Integer> res = new ArrayList<>();"</em>

<em>  int[][] arr = new int[queries.size()][3];</em>

<em>  "List<Integer> goodArray = new ArrayList<>();"</em>

<em>  "for (int i = 1; i <= N; i++) {"</em>

<em>   "int num = i;"</em>

<em>   "while (num % 2 == 0) {"</em>

<em>    "goodArray.add(num);"</em>

<em>    "num = num / 2;"</em>

<em>   }</em>

<em>  }</em>

<em>  int index = 0;</em>

<em>  for (List<Integer> l : queries) {</em>

<em>   arr[index][0] = l.get(0);</em>

<em>   arr[index][1] = l.get(1);</em>

<em>   arr[index][2] = l.get(2);</em>

<em>   index++;</em>

<em>  }</em>

<em>  Collections.sort(goodArray);</em>

<em>  "for (int i = 0; i < arr.length; i++) {"</em>

<em>   "int[] query = arr[i];"</em>

<em>   int l = query[0];</em>

<em>   int r = query[1];</em>

<em>   int m = query[2];</em>

<em>   int prod = 1;</em>

<em>   "for (int j = l - 1; j <= r - 1; j++) {"</em>

<em>    "prod = (int) (prod * goodArray.get(j)) % m;"</em>

<em>   }</em>

<em>   res.add(prod);</em>

<em>  }</em>

<em>  return res;</em>

<em> }</em>

<em />

<em>}</em>

See more about python at brainly.com/question/18502436

#SPJ1

8 0
2 years ago
Paano nakatutulong ang teknolohiyang pangkomunikasyon sa pangangalap ng impormsyon
Makovka662 [10]

Answer:

Yes correct. Absolutely breathtaking. You should create poetry with your writing skills.

6 0
3 years ago
To execute a prepared SQL statement, you can use the _______ and execute methods of the PDOStatement object to set parameter val
goldenfox [79]

Answer:

To execute a prepared SQL statement, you can use the bindValue

Explanation:

In PHP, the bindValue () function is inbuilt and can be used to bind values and variables to a parameter, hence it is more versatile. In SQL, the bindValue () function ties value to question mark placeholder or corresponding named in order to adequately get the statement ready.

7 0
3 years ago
What is the value of alpha[4] after the following code executes? int[] alpha = new int[5]; for (int j = 0; j &lt; 5; j++) alpha[
LUCKY_DIMON [66]

Answer:

7

Explanation:

alpha[4] = 2*4 - 1, which evaluates to 7.

4 0
3 years ago
Other questions:
  • The bit width of the LRU counter for a 32 KB 16-way set associative cache with 32 Byte line size is
    13·1 answer
  • Use the following business rules to assign name to the tables on the ERD: Note: These rules are in the context of a small retail
    7·1 answer
  • 5. How can a budget prepare you to become financially secure?
    10·2 answers
  • What wireless networking radio frequency yields faster speeds but offers shorter range ?
    11·1 answer
  • An online service provider provides its users with hosted​ computers, an operating​ system, and a database management system​ (D
    6·1 answer
  • Patient letters created from __________ use structured data and do not require a large amount of typing from the medical assista
    8·1 answer
  • What piece of software tells the operating system how to use a specific hardware device?
    14·1 answer
  • Gps receivers are commonly used by individuals to determine their geographic location while hiking and to obtain driving directi
    5·1 answer
  • What starts with p and ends with orn
    15·2 answers
  • Need this java code its on zybooks. given two integers as user inputs that represent the number of drinks to buy and the number
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!