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
Ainat [17]
4 years ago
10

In class, we discussed static local variables in C. Answereach question below; if necessary, find and consult a reference on the

C language (cite your source in your answer).
(a) For a non-static local variable in a C function, what is its scopeand what is its lifetime?
(b) For a static local variable in a C function, what is its scope andwhat is its lifetime?
(c) For a non-static global variable in C, what is its scope and whatis its lifetime?
(d) For a static global variable in C, what is its scope and what is itslifetime?
Computers and Technology
1 answer:
alexira [117]4 years ago
6 0

Answer:

(a) scope: function, lifetime: duration of the function

(b) scope: function, lifetime: duration of the program

(c) scope: global (all modules),  lifetime: duration of the program

(d) scope: module (file), lifetime: duration of the program

You might be interested in
A built in mathematical formulae used to perform calculation _______​
zubka84 [21]

Answer:

o enter an Excel formula into a cell, you start with an equal (=) sign. Excel then knows that the expression that follows should be interpreted as a calculation, not text. After the equal sign, you enter the formula. For example, you can find the sum of the numbers in cells C2 and C3 by using the formula =C2+C3.

Explanation:

hope that helps you

6 0
3 years ago
What is the only language a microprocessor can process directly but most programmers almost never write programs in this code?
Phantasy [73]
Assembly language, a.k.a. machine language.
6 0
3 years ago
write a while loop that reads integers from input and calculates integer finalnum as follows: if the input is divisible by 5, ad
ira [324]

The while loop for the program that reads integers from input and calculates integer is illustrated thus:

#include <iostream>

using namespace std;

int main()

{

//declaring the variables

int userInput;

int outputVal;

outputVal = -19;

//take user input

cin >> userInput;

//take user input until negative input is given

while(userInput > 0)

{

 //if the input is divisible by 5, subtract the

 //input divided by 5 from outputVal

 if(userInput%5==0)

     outputVal -= userInput/5;  

 //if the input is not divisible by 5, add the

 //input multiplied by 5 from outputVal

  else

     outputVal += userInput*5;

   cin >> userInput; // take input

}

//print the output value

  cout << "Output value is " << outputVal << endl;

return 0;

<h3>What is a while loop?</h3>

A while loop is a control flow statement in most computer programming languages that allows code to be performed repeatedly based on a supplied Boolean condition. The while loop is similar to a looping if statement.

A "While" Loop is used to iterate over a certain block of code until a condition is met. If we wish to ask a user for a number between 1 and 10, we don't know how many times the user may enter a larger number, so we keep asking "while the number is not between 1 and 10."

Learn more about program on:

brainly.com/question/22654163

#SPJ1

7 0
1 year ago
What will be returned when the following SQL statement is executed?
ycow [4]

Answer:

b) A listing of each driver as well as the number of deliveries that he or she has made

Explanation:

SQL which stands for Structured Query Language. and an SQL statements are used in performing tasks such as to update data on a database, or retrieve data from a database. Some of the popular relational database management systems that use SQL are: Sybase, Oracle, Microsoft SQL Server, Ingres, Access, etc.

3 0
3 years ago
Read 2 more answers
An archive of files that usually contain scripts that install the software contents to the correct location on the system is ref
Anika [276]

Answer:

Option 3 is the correct answer for the above question.

Explanation:

  • A tarball is a software which is used to encrypt the other software or hide the other software and make it small. It again makes the original software program from the encrypted ones.
  • It is used to make the file sort and can use for the transfer which takes some amount of memory.
  • The above question asked about that technology which is used to make encrypted software from the original software and use it with the help of some script. Then the answer is tarball which is referred to from option 3. Hence Option 3 is the correct answer for the above question while the other is not because--
  • Option 1 states about the package manager which is used to manage the library only.
  • Option 2 states about the DBMS which is used to manage the database.
  • Option 4 states about the router which is used for the internet.

8 0
3 years ago
Other questions:
  • Consider an SRS for a system to manage grades at a typical University:
    14·1 answer
  • If I gain a rank and go under the points that the rank coust do I lose the rank
    8·2 answers
  • What is the name of the option in most presentation applications with which you can modify slide elements?
    9·2 answers
  • What is sfa software?
    10·1 answer
  • PLEASE HELP 98 POINTS!!!!!!!!!!!!!!!!!!
    12·2 answers
  • Https://meetme.bit.nl/OfficialTrapstarz Join yall its my birthday
    13·2 answers
  • Write a function using statements called Print Reportl) which will take no float
    10·1 answer
  • Note oj cyber security​
    6·1 answer
  • Complete the code to convert a float to a string. <br> answer=5.3 <br> strAnswer=__ (answer)
    12·2 answers
  • Write a paragraph on 'Save Earth Save Life.'​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!