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,710 points
779 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,680 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,040 points
835 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,040 points
851 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
419 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
392 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,600 points
2,843 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,714 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
1,108 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,350 points
11,292 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,680 points
1,173 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,680 points
760 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