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
Shtirlitz [24]
3 years ago
12

The programmer must initialize variables when they are declared

Computers and Technology
1 answer:
lorasvet [3.4K]3 years ago
6 0

Answer: When you declare a variable, you should also initialize it. Two types of variable initialization exist: explicit and implicit. Variables are explicitly initialized if they are assigned a value in the declaration statement. Implicit initialization occurs when variables are assigned a value during processing.

Explanation:

For example, in JavaScript

var PaintAmount = 50; -declare and initialize  

function setup() {

   creatCanvas(200, 200);

}  

function draw() {

   ellipse(PaintAmount, PaintAmount) -use the variable PaintAmount

}

or rather in Java,

package random;

public class something() {

Public static void Main(String []args) {

        string name;  // this is declaring the variable with the example type  

     

       string name = new string; //this initializes the declared variable

}

}

You might be interested in
Write a program in c++ to displaypascal’s triangle?
Harman [31]

<u> C++ Program to Print Pascal's Triangle</u>

 #include<iostream> //header file

using namespace std;

//driver function  

int main()

{

   int r;/*declaring r for Number of rows*/

   cout << "Enter the number of rows : ";

   cin >> r;

   cout << endl;

 

   for (int a = 0; a < r; a++)

   {

       int value = 1;

       for (int b = 1; b < (r - a); b++) /*Printing the indentation space*/

       {

           cout << "   ";

       }

       for (int c = 0; c <= a; c++) /*Finding value of binomial coefficient*/

       {

           cout << "      " << value;

           value = value * (a - c) / (c + 1);

       }

       cout << endl << endl;

   }

   cout << endl;

   return 0;

}

<u>Output</u>

<u>Enter the number of rows :  5</u>

                 1

              1      1

           1      2      1

        1      3      3      1

     1      4      6      4      1

7 0
3 years ago
What is the next line?
marissa [1.9K]

Explanation:

solução de ácido clorídrico (HCI 6 m e HCI 0,6 m)

7 0
3 years ago
What is a URN (include example)
BARSIC [14]

Answer: URN(Uniform Resource Name) is the basically a subset of the Uniform Resource identifier(URL). It uses "urn"scheme for the working an implementation. Uniform resource name functions by identifying components uniquely through their name.

The most common example of URN is ISBN (International Standard Book Number)number which helps in the unique searching and identification of book.

7 0
4 years ago
Reading is the process of transferring data, instructions, and information from memory to a storage medium.
maksim [4K]
True, the computer will read from, say, a blu-ray and then transfer it to your RAM to before writing it to your hard drive and then, through the various other wonders of computers, it can be displayed on your monitor.
8 0
4 years ago
OH NO THE HEAVY IS DEAD
Anarel [89]

Answer:

what does that mean?

are you okay?

Did something happen?

4 0
3 years ago
Read 2 more answers
Other questions:
  • Tower defense is included under which genre of game
    15·2 answers
  • What do you remember about the difference between Canadian and US dollar (which one is greater)? Also, explain which online tool
    6·1 answer
  • Maria found a cupcake recipe on a cooking blog. However, she would like to read comments and suggestions before she begins bakin
    6·2 answers
  • Explain the history of computing of mechanical era
    14·2 answers
  • Which of the selections below is not a benefit of imaging the computers on your network? There are fewer licensing fees because
    11·1 answer
  • The study of a current business and information system application and the definition of user requirements and priorities for a
    5·1 answer
  • .Choose the extention of Scratch Project<br><br><br> .sb2<br><br> jpeg<br><br> .exls
    5·2 answers
  • The use of desktop computer equipment and software to create high-quality documents such as newsletters, business cards, letterh
    14·1 answer
  • If someone said to you, “Pseudocode is a waste of time! It’s just more work because you end up writing the same program twice,”
    8·1 answer
  • An app ________ is a website that provides access to specific mobile apps that can be downloaded either for a nominal fee or fre
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!