Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 584595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:54:52+00:00 2026-05-13T14:54:52+00:00

Difference between value parameter and reference parameter ? This question is asked sometime by

  • 0

Difference between value parameter and reference parameter ? This question is asked sometime by interviewers during my interviews. Can someone tell me the exact difference that is easy to explain with example? And is reference parameter and pointer parameter are same thing ?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T14:54:52+00:00Added an answer on May 13, 2026 at 2:54 pm

    Changes to a value parameter are not visible to the caller (also called “pass by value”).

    Changes to a reference parameter are visible to the caller (“pass by reference”).

    C++ example:

    void by_value(int n) { n = 42; }
    void by_ref(int& n) { n = 42; }
    
    void also_value(int const& n); // Even though a reference is used, this is
    // semantically a value parameter---though there are implementation
    // artifacts, like not being able to write "n = 42" (it's const) and object
    // identity (&n here has different ramifications than for by_value above).
    

    One use of pointers is to implement “reference” parameters without using a special reference concept, which some languages, such as C, don’t have. (Of course you can also treat pointers as values themselves.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 533k
  • Answers 533k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer If you want to have the background behind a block… May 17, 2026 at 12:26 am
  • Editorial Team
    Editorial Team added an answer Yes, it does use session. May 17, 2026 at 12:26 am
  • Editorial Team
    Editorial Team added an answer Make life a bit simplier and use typedefs identity<void*[4]>::type *panelDesc;… May 17, 2026 at 12:26 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

What is the difference between the following parameter passing mechanisms in C++? void foo(int
What is the fundamental difference between using $(this) vs this $('.viewComments').click(function(ev){ //returns the desired
I need help getting my head around the difference between my current OOP notion
What's the difference between Double.MIN_NORMAL (introduced in Java 1.6) and Double.MIN_VALUE ?
Possible Duplicate: What is the difference between using a struct with two fields and
I am trying to understand the difference between mysqli's query() and prepare(). I have
I wrote this class for testing: class PassByReference: def __init__(self): self.variable = 'Original' self.change(self.variable)
I understand that if I pass a value-type ( int , struct , etc.)
I am having a problem getting Automatic Differentiation to work between C# and F#.
This is the only official documentation available for the Halo: Reach stats API. If

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.