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 1030149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:39:15+00:00 2026-05-16T12:39:15+00:00

Why do we use ouput parameters, e.g. void f() { int first, next; read(out

  • 0

Why do we use ouput parameters, e.g.

void f() {
    int first, next;
    read(out first, out next);
}

void read (out int first, out intnext) {
    first = console.read();
    next = console.read();
}

Instead of writing all this code why don’t we use:

void f() {
    int first, next;
    first = console.read();
    next = console.read();
}
  • 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-16T12:39:16+00:00Added an answer on May 16, 2026 at 12:39 pm

    out (C# Reference)

    out

    Declaring an out method is useful when you want a method to return multiple values. A method that uses an out parameter can still return a value. A method can have more than one out parameter.

    The out keyword causes arguments to be passed by reference. This is similar to the ref keyword, except that ref requires that the variable be initialized before being passed. To use an out parameter, both the method definition and the calling method must explicitly use the out keyword.

    Although variables passed as an out arguments need not be initialized prior to being passed, the calling method is required to assign a value before the method returns.

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

Sidebar

Related Questions

I was following this tutorial . I need to use a php file's ouput
How can I use output caching with a .ashx handler? In this case I'm
Lets take qsort()'s comparison callback function as an example int (*compar)(const void *, const
In C, I can put a log printf inside a function like this: void
I'm having problems getting this code to populate output parameters with MSSQL ODBC 10.0
I am using a RESTfull webservice with this methode: @POST @Consumes({application/json}) @Path(create/) public void
I was curious why this doesn't work: const int ASSIGN_LEFT = 1; const int
When I use the __FUNCTION__ macro/variable to print out debugging information, there seems to
I'm not a software person, but I could really use some advice. I'm writing
How use output parameter from procedure?

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.