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
Rasek [7]
3 years ago
9

You are writing a program that defines a variable within a loop, and then tries to use that variable outside the loop. However,

the program does not run as intended. What is the issue?
Computers and Technology
1 answer:
Law Incorporation [45]3 years ago
4 0

Answer:

The Variable is out of scope

Explanation:

In programming variables exists with scopes This could be local or global. When a variable is declared as a global variable it is available to all methods and procedures in the program. Java programming language as well as C++ and several others use the open and close braces to define the scope in programs. consider the following example

<em>public class ANot {</em>

<em>    public static void main(String[] args) {</em>

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

<em>        while ( i<10){</em>

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

<em>            sum = sum+i;       </em>

<em>        }</em>

<em>    }</em>

<em>}</em>

In this example, the variable i is global and can be assessed within the while loop but the variable sum is local to the while loop and cannot be assessed outside of it

You might be interested in
Which of these statements about the truck driving occupation in the U.S. are accurate?
Airida [17]

Answer:

I'm unsure 38373672823

8 0
3 years ago
Read 2 more answers
Given the following MIPS Code Fragment:
galben [10]

Answer:

There are 3 Data Hazard

Explanation:

Find attached the solution

6 0
3 years ago
An administrator is troubleshooting an endpoint whose SIP Registration Status shows "Failed: 403 Forbidden" and must obtain info
Katena32 [7]

Answer:

A and C

Explanation:

To obtain information about the case of the error the engineer would navigte thus:

Endpoint > Log Files > messages.log > (c) VCS > Maintenance > Diagnostics > Incident Reporting > View.

Cheers

8 0
3 years ago
EASY In the image, what will be the result of pressing the Delete key
kaheart [24]
D would be the answer
7 0
3 years ago
Read 2 more answers
You are a network consultant who has been asked to attend an initial meeting with the executive management team of ElectroMyCycl
Snezhnost [94]

Answer:

ElectroMyCycle, LLC.

The research I will do before my initial meeting with the executive management team will be to find out the following:

4. Client’s suppliers and customers

5. Products and services offered

Explanation:

My research will concentrate on the types of products and services  that ElectroMyCycle is offering its customers and raw materials that it purchases from the suppliers, because the network assets are being installed to enhance business transactions between ElectroMyCycle and its customers and suppliers.  And as the company is expanding with more suppliers and customers, more products and services, the network configuration will be built around these stakeholders.

4 0
3 years ago
Other questions:
  • Which statement describes the word "iterative"?
    7·2 answers
  • Shakespeare’s complete works have approximately 3.5 million characters. Which is bigger in file size: Shakespeare’s complete wor
    5·2 answers
  • When you use the ip address of the web server, the correct site is displayed?
    15·1 answer
  • What is Processor to Memory Mismatch problem?
    15·1 answer
  • What is a Better Computer?<br> A. Alien<br> B. Microsoft<br> C. Windows<br> D. Apple
    11·2 answers
  • What career cluster does a fish and game warden fall in?
    14·1 answer
  • _____ separation strategies (e.g., attacking and sabotaging others) are used by those for whom co-cultural segregation is an imp
    5·1 answer
  • Impanation stage contain ​
    10·1 answer
  • Compare GBN, SR, and TCP (no delayed ACK). Assume that the timeout values for all three protocols are sufficiently long such tha
    11·1 answer
  • Which of the following is defined as the elastic leasing of pooled computer resource over the Internet? 1) Broadband 2) Wiki 3)
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!