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
Nataly [62]
3 years ago
7

Reference variables allow arguments to be passed by ____________.

Computers and Technology
1 answer:
son4ous [18]3 years ago
7 0

Answer:

Reference

Explanation:

The Reference type variable is such type of variable in C# that holds the reference of memory address instead of value. Examples for reference type are classes, interfaces, delegates and arrays.

We can pass parameters to the method by reference using <em>ref </em>keyword

It’s mandatory to initialize the variable value before we pass it as an argument to the method in c#

For example,

int x = 10;  // Variable need to be initialized

Add(ref x); // method call

If you pass parameters by reference in method definition, any changes made to it affect the other variable in method call.

Here's a sample program:

using System;

namespace ConsoleApplication

{

   public class Test

   {

       public static void Main()

       {

           int i = 10;

           Console.WriteLine("i=" + i);

           Add(ref i);

           Console.WriteLine("i=" + i);

           Console.ReadLine();

       }

       public static void Add( ref int j)

       {

           j = j + 10;

           Console.WriteLine("j="+j);

       }

   }

}

Output:

i=10

j=20

i=20

You might be interested in
When you need to switch on an electrical current at a remote location, would you use a relay or an amplifier?
ahrayia [7]

Answer:

Relay

Explanation:

They both perform similar functions in terms of control of voltage and current but the relay would be better because although it cannot produce a variable output like that of an amplifier, it has the capacity to isolate its input from its output.

7 0
3 years ago
kelly wants to buy a new operating system for a laptop. under which category will it be in online store?
GuDViN [60]

Answer:

Kelly should look at the electronics section, where the laptops are because a laptop is an electronic. Just like an iPhone, iPad, and a TV.

7 0
4 years ago
Provide the subnet, broadcast address and the valid host ranges for each of the
avanturin [10]

Answer:

You should now be able to give IP addresses to 254 hosts. This works fine if all 150 computers are on a single network. However, your 150 computers are on three separate physical networks. Instead of requesting more address blocks for each network, you divide your network into subnets that enable you to use one block of addresses on multiple physical networks

Explanation:

3 0
3 years ago
How to hack free fire dimond
Evgesh-ka [11]

Explanation:

no way

your account gets banned if u try

5 0
3 years ago
Read 2 more answers
Many people in modern society have the notion that hard disks can be searched in an hour and files can be recovered from inciner
atroni [7]

Answer:

The CSI effect.

Explanation:

  • The process of recovering the file or the directory from the hard disks that are  burned by teaming them up to a computer is known as the CSI effect in the hard disk.
  • This term is given by the expertise in the organization and it is used in the modern  society  .The CSI is used for only the hard disk in the computer system.
5 0
4 years ago
Other questions:
  • How do you fix a computer
    12·1 answer
  • what would happen if a large number of computer users are attempting to access a web site at the same time that you are
    15·2 answers
  • Answer: x = 3<br>#1 -2x + 5 = -31​
    10·1 answer
  • What is value parameter and reference parameter while things are passed by Also, do a c code to show it
    13·1 answer
  • is the process of creating a message to be communicated. a. Encoding b. Decoding c. Receiving d. Sending
    10·2 answers
  • Write a statement that defines an ifstream object named inputFile and opens a file named "Friends.txt".
    13·1 answer
  • Need help!! Write an interactive program that reads lines of input from the user and converts each line into "Pig Latin." Pig La
    9·1 answer
  • Our Client, a renowned trading company, suffered a sudden, devastating power outage that caused their server to cease functionin
    13·1 answer
  • Write a program that receives a series of numbers from the user and allows the user to press the enter key to indicate that he o
    10·1 answer
  • Which of the following statements best represents the impact vaudeville had on the film industry? Early silent films were more r
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!