About 627,000 results
Open links in new tab
  1. C Function Arguments and Function Return Values

    Jan 10, 2025 · Functions can be differentiated into 4 types according to the arguments passed and value returns these are: 1. Function with arguments and return value. Syntax: int function( …

  2. Returning multiple values from a C++ function - Stack Overflow

    Aug 19, 2015 · Is there a preferred way to return multiple values from a C++ function? For example, imagine a function that divides two integers and returns both the quotient and the …

  3. C++ Functions - Return - W3Schools

    If you want the function to return a value, you can use a data type (such as int, string, etc.) instead of void, and use the return keyword inside the function: This example returns the sum of a …

  4. C++ Passing Function Arguments and Returning Values

    The main difference between arguments and parameters is that we use the term “argument” for the values we pass while calling the function. Whereas, the term “parameter” is used when we …

  5. C++ Program to Create a Function with Arguments and a Return Value

    Oct 19, 2022 · Learn how to create a function in C++ that accepts arguments and returns a value with this comprehensive guide.

  6. 2.4 — Introduction to function parameters and arguments

    Feb 18, 2025 · Function parameters and return values are the key mechanisms by which functions can be written in a reusable way, as it allows us to write functions that can perform …

  7. Returning several values from a function in C++ (C++23 edition)

    6 days ago · As a bonus, in this example, I am using C++23’s std::println function which is available with GCC 14 and LLVM 19. The structured binding approach (the keyword ‘auto’ …

  8. In C++ Output Parameter vs Return Value - Stack Overflow

    Jan 29, 2020 · The return value is something well defined in C++; for instance, x in return x; is the return value, whereas int in the function declaration int myfunc() is the return type. The …

  9. Mastering Function Arguments in C++: A Quick Guide

    In C++, function arguments are the values you pass to a function when you call it, allowing you to send data for processing within that function. Here's a simple example: // Function that takes …

  10. Passing and Returning Objects in C++ - GeeksforGeeks

    Mar 17, 2021 · In C++ we can pass class's objects as arguments and also return them from a function the same way we pass and return other variables. No special keyword or header file …

  11. Some results have been removed
Refresh