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
Maurinko [17]
4 years ago
7

Taking a suitable example in c language explain the of call by value and call by reference concepts.

Computers and Technology
1 answer:
Degger [83]4 years ago
8 0

Answer: The difference between call by value and call by reference is that in call by value the actual parameters are passed into the function as arguments whereas in call by reference the address of the variables are sent as parameters.

Explanation:

Some examples are:

call by value

#include <stdio.h>  

void swap(int, int);

int main()

{  int a = 10, b= 20;

 swap(a, b);

 printf("a: %d, b: %d\n", a, b);

}  

void swap(int c, int d)

{

 int t;

 t = c; c = d; d = t;

}  

OUTPUT

a: 10, b: 20

The value of a and b remain unchanged as the values are local

//call by reference

#include <stdio.h>

 void swap(int*, int*);

 int main()

{

 int a = 10, b = 20;

 swap(&a, &b);   //passing the address

 printf("a: %d, b: %d\n", a, b);

}

void swap(int *c, int *d)

{

 int t;

 t = *c; *c = *d; *d = t;

}

OUTPUT

a: 20, b: 10

due to dereferencing by the pointer the value  can be changed which is call by reference

You might be interested in
A ____ database supports data distributed across several different sites.
Tcecarenko [31]
The blank is supposed to be "distributed" so the sentence goes like this "A distributed database supports data distributed across several different sites"<span />
5 0
3 years ago
Customizing ads to people who had earlier visited the site is
MakcuM [25]

Remarketing/Retargeting is a way to connect with people who had previously visited  your website. It allows you to position your ads in front of these audiences, as they browse Google or its partner websites, thus helping you increase your brand awareness and at the same time remind those audiences to make a purchase.

6 0
3 years ago
What is not true of credit scores?
Nadya [2.5K]
The more money you make, the higher your credit score.credit is a numerical value to measure your favor-ability in borrowing activities.This numerical value is mostly influenced by how good you are in handling your financial responsibilities, whether you're paying debt on time or you're making loans often. So the amount of money you earn has nothing to do in this valuation.

Hope this helps:))

5 0
3 years ago
Impanation stage contain ​
Katen [24]
I would need more to answer your question
7 0
3 years ago
Eliza needs to share contact information with another user, but she wants to include only certain information in the contact. Wh
Maslowich

Answer:

Use the edit business card dialog box to control the information.

Explanation:

Business card is an easiest way to share contact details with other persons. There are some reasons a person might not want to share entire details of the contact it has with the other person, for this purpose the business card outlook has an option to edit the information of contact before sending it to the other person. Click the contact card and select the relevant contact that needs to be shared, then double click the contact it will display an edit option.

6 0
3 years ago
Read 2 more answers
Other questions:
  • Select the correct answer.
    6·1 answer
  • A mobile device has stopped receiving automatic OS updates that until recently were pushed to the device.
    7·2 answers
  • How can multiple items be selected at the same time in aJList?
    8·1 answer
  • If a client is found _________ the NAP will attempt to make it _______. Group of answer choices A. non-compliant, compliant B. s
    13·2 answers
  • Which would be included in a SaaS platform?<br><br> A.data link<br> B.IaaS<br> C.Java<br> D.vb.net
    5·1 answer
  • What are the 2 things you are not sure about evaluating functions​
    7·2 answers
  • Will give brainly if answer all or my questions
    8·1 answer
  • User defined blocks of code can be created in
    13·1 answer
  • Question #1
    13·2 answers
  • When one loop appears inside another, the loop that contains the other loop is called the ____ loop. Group of answer choices ind
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!