can somebody explain me what does passing by value and Passing by reference mean in C

0 votes

According to me the "passing by value" would mean using the line below:-

int i = 9;

Coders usually pass int i into a method like:

method(i) Passing by reference means exactly passing its location like :

Class.method.variable

and it will give out the value. Could anybody please help me out?

Feb 10, 2022 in Others by Soham
• 9,700 points
591 views

1 answer to this question.

0 votes
To answer your question, “passing by value” is nothing but once the actual value has been passed to the variable into the function. Understanding the reference you mentioned, the value 9 will be passed. Similarly, “passing by reference” would state that the function is where the variable is passed and not only including the value. Once again, in the reference you provided, the value of 9 will be used which would pass an integer. Each of these add consequences which is very useful for various scenarios.
answered Feb 10, 2022 by Rahul
• 9,670 points

Related Questions In Others

0 votes
0 answers

LF will be replaced by CRLF in git - What is that and is it important?

I was trying to create a new ...READ MORE

May 16, 2022 in Others by Kichu
• 19,050 points
704 views
0 votes
0 answers

What does "int 21h" mean in Assembly?

What does the command int 21h mean?  For example: mov ...READ MORE

May 24, 2022 in Others by Kichu
• 19,050 points
504 views
0 votes
0 answers

What does the suspend function mean in a Kotlin Coroutine?

I'm reading Kotlin Coroutine and know that ...READ MORE

May 26, 2022 in Others by Harshitha
• 120 points
240 views
0 votes
0 answers

What does %>% mean in R

I am following this example, the server.R, file is ...READ MORE

Jun 1, 2022 in Others by avinash
• 1,840 points
180 views
0 votes
1 answer

How to reference Microsoft.Office.Interop.Excel dll?

Use NuGet (VS 2013+): The NuGet package manager ...READ MORE

answered Oct 9, 2022 in Others by narikkadan
• 63,420 points
2,284 views
0 votes
3 answers

Trying to upload files using Selenium(C#)

You can try using Javascript Executor to ...READ MORE

answered Aug 23, 2019 in Selenium by Abha
• 28,140 points
5,220 views
0 votes
1 answer

Deploy my Windows 10 IOT core application locally!

Of course, you, can! That is, in ...READ MORE

answered Jul 17, 2018 in IoT (Internet of Things) by nirvana
• 3,130 points
885 views
+6 votes
16 answers

How do backend of these really cool games work?

Most of the games these days don't ...READ MORE

answered Jul 19, 2018 in Career Counselling by Kalgi
• 52,360 points
10,189 views
0 votes
1 answer

What does enctype='multipart/form-data' mean?

When any POST request is made, then ...READ MORE

answered Feb 10, 2022 in Others by Rahul
• 9,670 points
858 views
0 votes
1 answer

What is the difference between POST and PUT in HTTP?

To answer your question, both of them ...READ MORE

answered Feb 11, 2022 in Others by Rahul
• 9,670 points
421 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP