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]
3 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]3 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
1000base-t is a standard for achieving throughputs ____ times faster than fast ethernet over copper cable.
meriva
An Average of 10 times faster.

Hope this helps!
3 0
3 years ago
Write an assembly language program with a loop and indexed addressing that calculates the sum of all the gaps between successive
PSYCHO15rus [73]

Answer:

Description: Write a MASM 32bit program with a loop and indexed addressing that calculates the sum of all thegaps between successive array elements. The array elements are doublewords, sequenced in nondecreasing order.

;Include Irvine32.inc file used with link library for 32 bit applications

.386

.model flat,stdcall

.stack 4096

ExitProcess proto,dwExitCode:dword

INCLUDE Irvine32.inc

.data

myArray DWORD 0,2,5,9,10

arrSize = ($-myArray)/TYPE myArray

gapArr DWORD arrSize-1 DUP(?)

sum DWORD ?

.code

main PROC

;Call the procedure

call Clrscr

;Initialize ESI pointer

mov esi, 0

mov ecx, arrSize

dec ecx

L1:

mov eax, myArray[esi+4]

sub eax, myArray[esi]

mov gapArr[esi], eax

inc esi

loop L1

;Calculate the sum of gaps between array elements

mov sum, 0

mov esi, 0

mov ecx, arrSize

dec ecx

;  move gapArr[esi] to a temporary register and then add that register value to sum

L2:

mov edx, gapArr[esi]  

add sum, edx

inc esi

loop L2

       INVOKE ExitProcess,0

main ENDP

END main

Explanation:

7 0
3 years ago
Digital manufacturing has impacted our world today! List a reasons why.
Maru [420]
Because we can get manufacturing faster than usual
6 0
3 years ago
Microsoft Publisher - Assignment #1
Allisa [31]

Answer:1

Explanation:

6 0
3 years ago
Which two statements about using leased lines for your wan infrastructure are true? (?
Karo-lina-s [1.5K]
<span>The following statements are true: 1. Leased lines require little installation and maintenance expertise. ( A high service quality is offered by point-to point system) 2. Leased lines provide highly flexible bandwidth scaling. (This Allows a Constant availability)</span>
7 0
3 years ago
Other questions:
  • Switches operate on what layer of the OSI Model
    11·1 answer
  • Which of the following functions does a browser perform?
    7·2 answers
  • When performing conflict management, it is important to identify your;
    6·1 answer
  • Why Stockholder are interested in the way a company operate?
    12·1 answer
  • Computer piracy occurs when what is violated
    6·1 answer
  • Write a function that, given an array A of N integers, of which represents loads caused by successive processes, the function sh
    15·1 answer
  • Xavier would like to change the sort options for his contacts. In which tab will he find the Arrangement command group?
    6·1 answer
  • Hydraulic systems use liquids because _____.
    14·2 answers
  • What does remedy mean
    7·2 answers
  • Which one of the statements best characterizes the current state of e-commerce?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!