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
True or False: It is illegal to park in a location that you block or create a hazard for other vehicles.
Feliz [49]
The answer to question is true
5 0
3 years ago
Read 2 more answers
Kiara is using her software's graphic formats to create a line graph. As she
rewona [7]

Answer:

Correct the data she entered, and the software will adjust the  graph.

Explanation:

Software is used to work with ease and efficiency. If there is any mistake during data entry, we can easily change that particular data and make it correct. There is no need to delete whole data and re enter the data again. As most of the software are user friendly and have the option to edit the information that already has been entered.

In mentioned case, Kiara should edit the data, that has been entered incorrect. After the correction of data, the graph will be automatically updated with new values and she found correct graph.

8 0
3 years ago
Read 2 more answers
Which option will Joan use to get a glimpse of how her presentation will look when she presents it to her audience? Joan will us
Murrr4er [49]

Since Joan wants to see what her presentation would look like in the eyes of her audience, it might be best for her to use the Slideshow view that is available at the bottom right side of her desktop view.

This option is a full-screen form of her Normal view in Microsoft PowerPoint. The Slideshow view is represented by the projector screen symbol next to the zoom in and out bar.

7 0
3 years ago
Read 2 more answers
The Office ____ is a temporary storage area. Warehouse Clipboard Storehouse Gallery
yanalaym [24]
The answer is The Office Clipboard.

In most Microsoft Windows, Office Clipboard is used as a temporary storage for some software applications such as Microsoft Office Applications. It allows you to store up to 24 items either texts or graphics. For example, when you copy a text from one location this text will be temporarily stored in the clipboard until you paste them to another location.
4 0
3 years ago
True or false? any webb app can be accessed and run on any computing
Mademuasel [1]

Answer:

B. False

Explanation:

A web application is a computer program that  works over the internet. So, in order to access and run it you need a web browser and this will also require to have an internet access. If you don't have one of these you will not be able to run the app.

6 0
3 years ago
Other questions:
  • 1. An Excel file is called a workbook?<br> A) True<br> B) False
    6·2 answers
  • Which folder is the default choice for saving bitmap or JPEG files created by a user?
    9·1 answer
  • The cold war actually helped in the development of the internet true or false
    8·1 answer
  • An alteration threat violates information integrity. <br> a. True <br> b. False
    13·1 answer
  • Which of these expressions is used to check whether num is equal to value?
    13·1 answer
  • PLS HELP ILL GIVE BRAINLY) enter the answer) desktop publishing software enables users to create products for print or _________
    12·1 answer
  • Sypherpk is good go sub 2 him
    6·2 answers
  • PLEASE I NEED HELP WITH THIS, IS FOR TODAY
    10·2 answers
  • Who are all the fnaf characters?
    7·1 answer
  • True or false. windows server standard edition supports software-defined networking
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!