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
Galina-37 [17]
3 years ago
6

Question B_1 (15 points) Please define (describe) local variables and how they are used in computer programming ( e.g. In C, C )

. Please write clearly and use no more than 2 sentences. Question B_2 ( 15 points) Please define (describe) static variables and how they are used in computer programming ( e.g. In C, C ). Please write clearly and use no more than 2 sentences. Question
Computers and Technology
1 answer:
OverLord2011 [107]3 years ago
5 0

Answer and Explanation:

Static variables are variables that still maintain their values outside the score which they are declared. They are declared with the static keyword

Example:

<em>static int score = 30;</em>

Local variables are variables whose scope are restricted to a block. Their values are restricted to the block which they are declared in.

Example:

<em>void abd(){</em>

<em>int score;</em>

<em>}</em>

<em>score is a local variable to abcd() function</em>

You might be interested in
I need urgent help...my laptop has been like this... can anyone help me plzzz​
lukranit [14]

Answer:

I think you have to restart your device.

6 0
3 years ago
Which image property helps to create distinction between the highlights and shadows of an object?
Nutka1998 [239]
I know filters, so I know it is Saturation.
6 0
3 years ago
Read 2 more answers
You are given a list of n positive integers a1, a2, . . . an and a positive integer t. Use dynamic programming to design an algo
Anna11 [10]

Answer:

See explaination for the program code

Explanation:

The code below

Pseudo-code:

//each item ai is used at most once

isSubsetSum(A[],n,t)//takes array of items of size n, and sum t

{

boolean subset[n+1][t+1];//creating a boolean mtraix

for i=1 to n+1

subset[i][1] = true; //initially setting all first column values as true

for i = 2 to t+1

subset[1][i] = false; //initialy setting all first row values as false

for i=2 to n

{

for j=2 to t

{

if(j<A[i-1])

subset[i][j] = subset[i-1][j];

if (j >= A[i-1])

subset[i][j] = subset[i-1][j] ||

subset[i - 1][j-set[i-1]];

}

}

//returns true if there is a subset with given sum t

//other wise returns false

return subset[n][t];

}

Recurrence relation:

T(n) =T(n-1)+ t//here t is runtime of inner loop, and innner loop will run n times

T(1)=1

solving recurrence:

T(n)=T(n-1)+t

T(n)=T(n-2)+t+t

T(n)=T(n-2)+2t

T(n)=T(n-3)+3t

,,

,

T(n)=T(n-n-1)+(n-1)t

T(n)=T(1)+(n-1)t

T(n)=1+(n-1)t = O(nt)

//so complexity is :O(nt)//where n is number of element, t is given sum

6 0
3 years ago
List five characteristics of a series circuit
Paladinen [302]
1. The current is the same everywhere in the circuit. This means that wherever I try to measure
the current, I will obtain the same reading.
2. Each component has an individual Ohm's law Voltage Drop. This means that I can calculate
the voltage using Ohm's Law if I know the current through the component and the resistance.
3. Kirchoff's Voltage Law Applies. This means that the sum of all the voltage sources is equal to
the sum of all the voltage drops or
VS = V1 + V2 + V3 + . . . + VN
4. The total resistance in the circuit is equal to the sum of the individual resistances.
RT = R1 + R2 + R3 + . . . + RN
5. The sum of the power supplied by the source is equal to the sum of the power dissipated in
the components.
<span>PT = P1 + P2 + P3 + . . . + PN</span>
6 0
3 years ago
The web server software used has a significant impact on how a web site's web pages look on a user's computer.
soldi70 [24.7K]
False. Apache (which serves about 63% of the web pages) just serves the files. How it looks is a combination of the HTML and CSS that the site uses.
6 0
3 years ago
Other questions:
  • Check My Work _____ are made in response to situations that have occurred frequently enough to enable managers to develop decisi
    15·1 answer
  • What does prominent hyperintensity mean relating to MRI?
    5·1 answer
  • How can you efficiently restrict the read-only function of a requesting SNMP management station based on the IP address?
    14·1 answer
  • Rick works for the government and is investigating a small business that the government suspects has been cheating on its taxes.
    15·1 answer
  • Which one of the following items is an example of software?
    12·2 answers
  • The length property of the String object returns
    15·1 answer
  • List the five parts of a system.describe them.
    13·1 answer
  • Brainliest For Tascake Because People Texted Before Tascake Could<br><br> Hurry Tascake
    13·2 answers
  • Which of the following is not a bus type A. Address bus B. Data bus C. Memory bus D. Control bus ​
    7·2 answers
  • State the functions of the parts of the computer​
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!