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
The diagnostic test that involves watching a computer monitor with alternating checkerboard patterns while an eeg is performed i
kolezko [41]

Answer:

VER.

Explanation:

The diagnostic test that involves watching a computer monitor with alternating checkerboard patterns while an ecg is performed is known as a​ VER.

6 0
3 years ago
Read 2 more answers
Assume that the variables gpa, deansList and studentName, have been declared and initialized . Write a statement that both adds
Alborosie

Answer:

Following are the statement which is given below:

if (gpa > 3.5)  // check the condition if gpa exceeds 3.5.

{

deansList++;  // increment of 1 in the deansList variable

cout << studentName;  // display the studentName,  

}

Explanation:

The description of the statement

  • In the if statement we check the condition of "gpa" .if  "gpa"  is greater then 3.5 then it executed the statement inside the if block otherwise nothing will be executed.
  • if control moves to the if part it adds to 1 to the deansList.
  • Finally, display the value of studentName.
3 0
3 years ago
Under the assumption that there exists an unknown Turing machine encodableinc1bits that decides3-SATis inO(n10) time, give imple
zmey [24]

Answer:

3. (9 points) The goal of this problem is to show that our formal definitions of P and NP imply that P = NP cannot have a non-constructive proof. Throughout this problem we assume a consistent, binary, encoding of both Turing machines and 3-SAT instances. Note that the complexities are intentionally not tight to address potential overheads from scan- ning the tape linearly in order to look for certain symbols. (a) (3 points) Show that for any constant cı, there is a constant c2 such that if Mi is a Turing machine encoded by at most bits that correctly decides 3-SAT in O(n10) time (aka. 3-SAT E TIME(n10), then there is a Turing machine M, encoded by at most most c2 bits that runs in O(n100) time such that if the 3-SAT instance has a satisfying assignment, M, accepts and writes a satisfying assignment at the end of the tape. (b) (3 points) Let M ...Mbe Turing machines show that the language {(k, M... Mk,t,w) | w is an instance of 3-SAT and one of M, writes a satisfying assignment to w in at most t steps can be decided by a Turing machine in (k2107 10) time. (c) (3 points) Under the assumption that there exists an unknown Turing machine encodable in c bits that decides 3-SAT is in O(n10) time, give implementation details for a Turing Machine M that decides 3-SAT in O(n10000) time. Hint: the constant factor in the big-O is able to hide any function related ci and c2, which independent of input sizes, and thus constants.

Explanation:

3. (9 points) The goal of this problem is to show that our formal definitions of P and NP imply that P = NP cannot have a non-constructive proof. Throughout this problem we assume a consistent, binary, encoding of both Turing machines and 3-SAT instances. Note that the complexities are intentionally not tight to address potential overheads from scan- ning the tape linearly in order to look for certain symbols. (a) (3 points) Show that for any constant cı, there is a constant c2 such that if Mi is a Turing machine encoded by at most bits that correctly decides 3-SAT in O(n10) time (aka. 3-SAT E TIME(n10), then there is a Turing machine M, encoded by at most most c2 bits that runs in O(n100) time such that if the 3-SAT instance has a satisfying assignment, M, accepts and writes a satisfying assignment at the end of the tape. (b) (3 points) Let M ...Mbe Turing machines show that the language {(k, M... Mk,t,w) | w is an instance of 3-SAT and one of M, writes a satisfying assignment to w in at most t steps can be decided by a Turing machine in (k2107 10) time. (c) (3 points) Under the assumption that there exists an unknown Turing machine encodable in c bits that decides 3-SAT is in O(n10) time, give implementation details for a Turing Machine M that decides 3-SAT in O(n10000) time. Hint: the constant factor in the big-O is able to hide any function related ci and c2, which independent of input sizes, and thus constants.

7 0
2 years ago
An employee is angry with his boss and wants to sabotage the company. To accomplish this he secretly changes some of the values
bonufazy [111]

Answer: Integrity loss

Explanation:

A set of data is said to have experienced a Loss of Integrity if some event has caused it to be incorrectly altered

7 0
2 years ago
When the user types into a Textbox control, the text is stored in the control's __________ property.
joja [24]

The property that stores the text a user types into a Textbox is called the: control's text property.

<h3>The Textbox Control</h3>

The Textbox Control is employed in display a text or accept the text as an input from a user. Also, single line of text can be accepted as input at runtime from a VB.NET Windows.

The text that displays on the Textbox can also be set. The control's text property therefore stores the text a user types into Textbox.

In conclusion, the property that stores the text a user types into a Textbox is called the: control's text property.

Learn more about Textbox Control on:

brainly.com/question/5677552

3 0
2 years ago
Other questions:
  • to prevent long page load time for pages containing images. It is best to use a compress file formatlike jpeg as well as appropr
    6·2 answers
  • Write a program that asks the user to enter a number within the range of 1 through 10. Use a switch statement to display the Rom
    13·1 answer
  • Which of the following means to find and fix errors in code?Which of the following means to find and fix errors in code?
    5·1 answer
  • What is the name of the unique identifier assigned to any personal computer that is connected to the internet?
    11·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    11·2 answers
  • If you can name this you get 15 points: ↑↑↓↓←→←→βα
    10·1 answer
  • Describe psychographic differences among the past five generations of Americans that you learned about in this course. What type
    5·1 answer
  • Which of these is a possible disadvantage of working with a team?
    6·1 answer
  • A system engineer enhances the security of a network by adding firewalls to both the external network and the internal company n
    11·1 answer
  • Identifying correction services tasks
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!