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
ddd [48]
3 years ago
7

What is the difference between "call by value" and "call by reference"? Explain with example in c language.

Computers and Technology
1 answer:
Serjik [45]3 years ago
7 0

Answer:

<u>Call by reference</u>

In an function if the variables are passed as reference variables this means that the variables are pointing to the original arguments.So the changes made in the function on the reference variables will be reflected back on the original arguments.

For example:-

#include<stdio.h>

void swap(&int f,&int s)

{

   int t=f;

   f=s;

  s =temp;  

}

int main()

{

int n,m;

n=45;

m=85;

swap(n,m);

printf("%d %d",m,n);

return 0;  

}

the values of m and n will get swapped.  

<u> Call by value</u>

In this program the values of m and n will not get swapped because they are passed by value.So duplicate copies of m and n will be created and manipulation will be done on them.

#include<stdio.h>

void swapv(int f,int s)

{

   int t=f;  

   f=s;  

   s=temp;

}

int main()

{  

int n,m;

n=45;

m=85;

swapv(n,m);

printf("%d %d",n,m);

return 0;

}

You might be interested in
2 what is deep learning?
lozanna [386]

Answer:

a type of machine learning based on artificial neural networks in which multiple layers of processing are used to extract progressively higher level features from data.

5 0
1 year ago
Write a query to show the price reduced by 10% for all products that are tables or entertainment centers with a standard price g
IceJOKER [234]

Answer:

Below is the required code:

Explanation:

SELECT Product_Finish AS "Desk Finish",

avg(Standard_Price) AS "Average Price"

FROM Product_T

WHERE "Average Price">200

ORDER BY "Average Price" DESC;

8 0
3 years ago
A python keyword______.
Cerrena [4.2K]

Answer:

cannot be used outside of its intented purpose

Explanation: python keywords are special reserved words that have specific meanings and purposes and can't be used for anything but those specific purposes

8 0
3 years ago
The publisher tab in the application control allows you to manage the various certificates that are used to do what to binaries?
artcher [175]

The publisher tab in the application control allows you to manage the various certificates that are used to sign to binaries. Publisher allow executables of a particular vendor, signed by a security certificate issued to the vendor by a Certificate Authority. Also, all applications and binary files either added to or modified on an endpoint that are signed by the certificate are automatically added to the whitelist.

3 0
3 years ago
Discuss the benefits of a system safety effort other than improved safety
klio [65]

Answer: Safety effort of system is defines as the measures that are taken to provide and maintain the protection of the system.There are several methods ,tool and efforts made for the system security .Benefits of the system security are as follows:-

  • Takes control over the hazardous situation and maintain the security
  • System security will also increase the development of the system easily.
  • Approach towards the analyzing of the system function
  • Data, information and functions are safe from being detected in unauthorized way.
  • Functions and implementation is made easy without the fear of getting attacked or hacked.

8 0
3 years ago
Other questions:
  • Where should you look to find contact information about a company? I. on the company website II. at your local library III. in t
    11·2 answers
  • What is one way to maintain Internet safety? a) avoid interacting with people on the Internet. B) avoid giving out information a
    7·1 answer
  • The shortest compressed format of the ipv6 address 2001:0db8:0000:1470:0000:0000:0000:0200 is
    6·1 answer
  • You should process the tokens by taking the first letter of every fifth word,starting with the first word in the file. Convert t
    12·1 answer
  • In Python what are the values passed into functions as input called?
    13·1 answer
  • Xbox one is not turning on and power brick is orange why is that?​
    6·1 answer
  • Why should information technology NOT be taught in school?​
    14·1 answer
  • Write a recursive method called sumTo that accepts an integer parameter n and returns a real number representing the sum of the
    12·1 answer
  • File names should be limited to 144 characters.<br><br> true or false
    12·1 answer
  • The _____ feature enables you to represent text as colorful visuals.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!