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
Assoli18 [71]
4 years ago
13

Suppose a variable is passed By Value to a parameter of a Sub procedure, and the parameter has its value changed inside the Sub

procedure. What will the value of the variable be after the Sub procedure has executed?
Computers and Technology
1 answer:
algol [13]4 years ago
4 0

Answer:

"The value of the variable will remain the same which is already have when the sub-processor is called".

Explanation:

The above question said that:-

void fun(int a)

{

  a=a+1;

}

void main()

{

  int a=5;

  fun(a);

}

//what will be the value of a in the main function after the fun function is excuted.

  • Then the answer is: the value of a will be 5 in the main function.
  • It is because when the fun function is called, then a variable that is defined in the fun function is a local variable for fun function. That scope after the fun function is null.
  • The a variable inside the fun function is a different variable and the main function a variable is also a different variable.
  • So when the user prints the value of a variable inside the fun function, it will give the result as 6.
  • But when he prints the value of a variable inside the main function, then it will give the value as 5.
You might be interested in
Explain why a computer cannot solve a problem for which there is no solution outside the computer.
SVEN [57.7K]

Answer:

Either there is no solution, as in there has not been a way discovered (An algorithm) to figure it out. In that case, a computer can also not figure it out, as it requires humans to write algorithms to solve the specific problem. The second case is how you interpret it: There are some problems that are just not computable.

5 0
3 years ago
You have imported a library with the birthMonth() function. Based on the API, how many strings are inputed to calculate the birt
Kruka [31]

Answer: Only 1 string is entered

str(dayWeek) is the only string entered into the function.

str(return) is outputted, not inputted.

Numbers are not strings.

// calculate birth month based on the day of the month, day of the week, and the birth year

// dayMonth {number} - a day of a month from 1 to 31

// dayWeek {string} - the name of the day of the week

// year {number} - the birth year

// return {string} - the month you were born

BirthdayLibrary.birthMonth(dayMonth, dayWeek, year);

8 0
3 years ago
11) A single inheritance model means: * A) A class can only have one parent class (superclass) B) A class can only have one chil
ollegr [7]

Answer:

The correct answer is Option A (A class can only have one parent class (superclass))

Explanation:

The inheritance model is a computer program used in Javascript. This model aimed to make code that has been programmed already still relevant to be used again at any time minimizing errors associated with typing a new code. Inheritance  makes the attributes of a particular class valid while still possible to use the attributes of another class.

A child class (subclass) inherits from the parent class (superclass). So, it is a single inheritance once the child class (subclass) inherits from a single parent class (superclass) creating a subclass. A parent class (superclass) is the class that gives its attributes for inheritance.

8 0
3 years ago
Given the message size of 16Kb, packet size of 2Kb, speed of 4Kbps over 3 links, how much time, will it take the message to trav
ruslelena [56]

Answer:

5 seconds

Explanation:

Given that :

Message size = 16kb

Packet size = 2kb

Speed = 4kbps

Number of links = 3

The time taken is calculated using the formula :

[Number of packets + (Number of links - 1)] * (packet size / speed)

Number of packets = message size / packet size

Number of packets = 16kb / 2 kb = 8

Hence,

[Number of packets + (Number of links - 1)] * (packet size / speed)

(8 + (3 - 1)) * (2 / 4)

(8 + 2) * (1 /2)

10 * 1/2

= 5 seconds

6 0
3 years ago
Suppose two hosts, A and B, are connected by a 10 Mbps link. The length of a packet is 12 Kb (Kilobits, i.e., 12 × 103 bits). Th
Alekssandra [29.7K]

Answer:

Answer is provided in the explanation section

Explanation:

Given data:

Bandwidth of link = 10* 106 bps

Length of packet = 12* 103 bits

Distance of link = 40 * 103m

Transmission Speed = 3 * 108 meters per second  

Formulas:

Transmission Delay = data size / bandwidth = (L /B) second

Propagation Delay = distance/transmission speed = d/s

Solution:

Transmission Delay = (12* 103 bits) / (10* 106 bps) = 0.0012 s = 1.2 millisecond

Propagation Delay = (40 * 103 meters)/ (3 * 108mps) = 0.000133 = 0.13 millisecond

4 0
4 years ago
Other questions:
  • Match terms in the first column with the order descriptions in column two.
    11·1 answer
  • What temporarily holds programs and date while the computer is on and allows the computer to access that information randomly?
    12·1 answer
  • What are the possible sources of the information that defines the functional dependencies that hold among the attributes of a re
    15·1 answer
  • Which statement does NOT describe working with text in presentation programs?
    13·2 answers
  • 1. How do you identify the location of components and replacement procedures for notebook systems?
    6·1 answer
  • Before you ever buy your first stock or bond, it's important to understand what type of investor you are. This depends on a numb
    12·1 answer
  • PI
    12·1 answer
  • The Klez virus was a worm created to "spoof others. What is "spoofing"?
    6·1 answer
  • What are the main dimensions of information system and their components
    13·1 answer
  • Which of the following safety and privacy features is not included in a P2P app or service?
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!