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 the following best describes the infrastructure ISPs provide?
svet-max [94.6K]

Answer:

cables, towers, and underground tubes

Explanation:

Its certainly the above one, and through this internet service is being provided. So internet service is self-understood, and what ISP firstly provides are cables, underground tubes, and the towers. And it is only these all through which the ISP provides internet service. And remember we are in this question dealing with the infrastructure and not the services or products. Hence, phone service, websites, and files, as well as the emails, search engines, and the videos, are not the solution here as they are not the infrastructure. And ISPs never provide the computers, ethernet cables or keyboards.

Hence, the correct answer is as mentioned in the answer section.

4 0
4 years ago
What type of system software manages memory?
Kobotan [32]

Answer:

"Operating System"

Explanation:

6 0
3 years ago
This standard library function returns a random floating-point number in the range of 0.0 up to 1.0 (but not including 1.0).
natulia [17]

Answer:

The answer would be A: Random

Explanation:

The random() function returns a generated random number (a pseudorandom number)

5 0
3 years ago
Apakah ada yang bisa menjelaskan potongan source code ini?
GarryVolchara [31]

This code attempts to fuse two strings together. So,

fuse("Apple", "Banana")

would return "ABpapnlaen a"

However, there are a couple of things wrong with this code:

- The for loop is incomplete (probably a copy paste error)

- It is unclear from the code if the array jawaban will overflow if kata1 and kata2 are large (it probably will)

- Biggest problem: the jawaban array is declared on the stack, which means it will be cleaned up when the function returns. So the caller of this function will reference unallocated memory! This is a huge bug!!

6 0
3 years ago
Make the correct match.
faltersainse [42]
<span>1. E 2. B 3. D 4. F 5. C 6. A Let's go about solving this problem in a process of elimination. So I'll be making each match in the easiest (for me) order. Initially I'm not sure about 1 & 2. But the match for #3 is rather obvious. So 3. Blending non-related clips and images to make a new video. This is a "D. Mashup" The next obvious answer is for #6. That is 6. Everything that happens to the video and audio after the footage has been shot. This is "A. Post production" Now of the remaining 4 choices, "Final Cut Pro" sounds like an actual program. And there's only 1 option that's asking for a specific program. So we have 2. Most popular post-production editing package by Apple Answer "B. Final Cut Pro" This leaves us with 3 options "C. Non-linear editing", "E. AVID", and "F. Timeline" Of these 3, only "F. Timeline" sounds list an element in the interface of a video editing package. So we have 4. An element in the interface of editing software Answer "F. Timeline" Now a quick google search reveals that "AVID" is a software company that makes video editing software. So 1. Company that makes high-end post-production software. Answer "E. AVID" And we're left with 5. Transferring film onto Beta, digitizing it to the computer, and editing it Answer "C. Non-linear editing" Now the only questionable choice is Non-linear editing (NLE) for #5. So doing a quick google search and I see that #5 over specified the task. The key characteristic of NLE is having the video and audio in digital form that can be readily accessed via a computer. And #5 does qualify for that task. So here's the final answers 1. E 2. B 3. D 4. F 5. C 6. A</span>
6 0
3 years ago
Other questions:
  • Although you are not a full administrator, you are asked to manage a protected document, allowing customized access to any inter
    7·1 answer
  • Discuss what technologies you might see in use at an enterprise. For example, where would you most likely see fiber-optic Ethern
    9·1 answer
  • Visme,PowerPoint, keynote and prezi are what kind of software
    15·1 answer
  • Hubs hardware advantage's and disadvantages​
    7·1 answer
  • Please Complete in Java a. Create a class named Book that has 5 fields variables: a stock number, author, title, price, and numb
    10·1 answer
  • Complete the sentence.
    9·1 answer
  • Line charts are best used for
    15·2 answers
  • Data is communicated through various input devices true or false​
    8·1 answer
  • You are a knowledge engineer and have been assigned the task of developing a knowledge base for an expert system to advise on mo
    14·1 answer
  • Which of these would be the best way to inform an employee that they are losing their job?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!