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 in Others by Soham
• 8,730 points
31 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 by Rahul
• 8,980 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 in Others by Kichu
• 19,040 points
78 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 in Others by Kichu
• 19,040 points
17 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 in Others by Harshitha
• 120 points
12 views
0 votes
0 answers

What does %>% mean in R

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

Jun 1 in Others by avinash
• 940 points
11 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,100 points
4,476 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
501 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
7,271 views
0 votes
1 answer
0 votes
1 answer

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

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

answered Feb 10 in Others by Rahul
• 8,980 points
142 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 in Others by Rahul
• 8,980 points
28 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP