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
Nutka1998 [239]
3 years ago
5

Unless you explicitly initialize global variables, they are automatically initialized to

Computers and Technology
1 answer:
shusha [124]3 years ago
4 0

Answer:

Zero(0)

Explanation:

<u>Global Variables </u>

Variables which are declared outside any function. Any function can use these variables,they are automatically initialized to zero(0).They are generally declared before main() function.

Example- C program for showing global variable is 0.

  #include <stdio.h>

   int g;  // declaring g as global variable

   int main()

   {

       printf("%d",g);  //printing global variable

       return 0;

    }

<u>Output</u>

  0

You might be interested in
Why when you are on wifi it keeps kicking you off is your class during online learning​
Leviafan [203]
Sometimes, it lags on the other side or from the teachers computer so the app just kicks people out sometimes, it’s sucks I know
7 0
2 years ago
Read 2 more answers
Write an if else statement that assigns 0 to the variable b and assigns 1 to the variable c if the variable a is less than 10. O
brilliants [131]

Answer:

if(a < 10)

{ b = 0; c = 1;}

else

{ b = -99; c = 0;}

Explanation:

4 0
3 years ago
When the "swen" virus infected someone's system, it made significant changes to the registry that caused it to be extremely diff
Effectus [21]
<span>In certain cases, when the Swen executable is removed or renamed by an anti virus program without stopping to fix the registry, it then will become impossible to run any executable files on the machine. This happens because windows will be unable to find the file that is associated with any executables on it's hard drive.</span>
7 0
3 years ago
True or False: Unity can apply multiple textures to a single object or terrain
MaRussiya [10]
This is very true unity is what u said and it is the definition of this
3 0
3 years ago
Output a table that show the cube of the numbers 1-15<br> (C++)
Rainbow [258]

Answer:

The c++ program to display cube of numbers from 1 to 15 is given below.

#include <iostream>

using namespace std;

int main() {    

   // variables declared and initialized  

   int num = 15, k, cube;    

   cout << " Cubes of numbers from 1 to 15 are shown below " << endl;    

   for( k = 1; k <= num; k++ )

   {

       // cube is calculated for each value of k and displayed

       cube = k * k * k ;

       cout << " \t " << cube << endl;

   }

return 0;

}

 

OUTPUT

Cubes of numbers from 1 to 15 are shown below  

  1

  8

  27

  64

  125

  216

  343

  512

  729

  1000

  1331

  1728

  2197

  2744

  3375

Explanation:

The variables are declared and initialized for loop, cube and for condition in the loop – k, cube, num respectively.

Inside for loop which executes over k, beginning from 1 to 15, cube of each value of k is calculated and displayed. The loop executes 15 times. Hence, cube for numbers from 1 to 15 is displayed after it is calculated.

   for( k = 1; k <= num; k++ )

   {

      cube = k * k * k ;

       cout << " \t " << cube << endl;

   }

In the first execution of the loop, k is initialized to 1 and variable cube contains cube of 1. Hence, 1 is displayed on the screen.

In the second execution, k is incremented by 1 and holds the value 2. The variable cube contains cube of 2, which is calculated, and 8 gets displayed on the screen.

After each execution of the loop, value of k is incremented.

After 15 executions, value of k is incremented by 1 and k holds the value 16. This new value is greater than num. Hence, the loop terminates.

3 0
3 years ago
Other questions:
  • On the food inventory worksheet, enter a function in cell G1 that counts the number of Food Items. What formula would i use!? Th
    5·1 answer
  • If two cars got to a four way stop intersection at the same time which car should be yield the right-of- way
    12·1 answer
  • How long does it take to wire a house?
    14·2 answers
  • Write a function, sublist, that takes in a list of numbers as the parameter. In the function, use a while loop to return a subli
    13·1 answer
  • A type of Knowledge Management System is called
    5·1 answer
  • What are the top ten alternative songs of the 2000's?
    7·1 answer
  • What goals do you set for yourself while studying?
    9·2 answers
  • True or false a computer with a high efficiency rating should stay cooler than one with a low effiency rating
    9·1 answer
  • If you delete a shortcut from your desktop, have you also deleted the original file?
    11·2 answers
  • Which class members should be declared as public?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!