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

  • Home
  • SEARCH
  • 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 7834323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T13:07:22+00:00 2026-06-02T13:07:22+00:00

what the result will be after execute the C-like program, if the parameter passing

  • 0

what the result will be after execute the C-like program, if the parameter passing mechanism is pass-by-name-result?

procedure swap(int x, int y){
    int t = x;
    x = y;
    y = t;
}

main(){
     int v = 1;
     int list[5] = {1,3,5,7,9};
     swap(v, list[v]);
}
  • 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-06-02T13:07:23+00:00Added an answer on June 2, 2026 at 1:07 pm

    (Note: I’m assuming that the question is about call-by-name as the question’s body suggests – not call-by-value-result as the title suggests.)

    When using call-by-name you can figure out the result of a function call by inserting the function’s body at the call site and replacing each occurrence of the parameter names in the function’s body with the (unevaluated) arguments.

    In this case that means replacing each occurrence of x with v and each occurrence of y with list[v]. If you do that and execute the resulting code in your head, you’ll see what the result is.

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

Sidebar

Related Questions

When querying using mysqli_stmt::prepare() and execute() , it will not return the result set.
I have a method I would like to execute (non repeating) after a time
My stored procedure looks like follows: sqlQuery := 'DROP INDEX idArchivoIndex'; EXECUTE IMMEDIATE sqlQuery;
Code (Note that the result will not display properly without the images referenced) I'm
I am working on creating a SQL query where the result will return a
How would I do: FinancialStatements.objects.get(statement_id=statement_id) or SalesStatements.objects.get(statement_id=statement_id) The result will always yield one result.
By immutable function or immutable method, I mean a function whose result will never
The following code snippet will result in a run-time: class Vehicle { public void
According to Java thread state info calling wait() will result a thread to go
It seems that HTMLCollection and NodeList is undefined in ie6/7,and following code will result

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.