answersLogoWhite

0

Not all functions return values. If you take a function which is of type void, you get a function which is does not return anything. The only functions which should return values are those which are used as a right side of expressions (so called rvalues).

User Avatar

Wiki User

15y ago

Still curious? Ask our experts.

Chat with our AI personalities

BlakeBlake
As your older brother, I've been where you are—maybe not exactly, but close enough.
Chat with Blake
MaxineMaxine
I respect you enough to keep it real.
Chat with Maxine
LaoLao
The path is yours to walk; I am only here to hold up a mirror.
Chat with Lao

Add your answer:

Earn +20 pts
Q: Why function should return a value?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Games

How do you get the red orb back from team aqua on Pokemon Sapphire?

Archie will return the Red orb himself. As you are on the top of mt. Pyre, you should return the blue orb too.


What are call by value and call by reference?

Call by value is where the argument value is copied to the formal parameter, which is then passed to the function. While the function is executing, it can see the copy of the argument, and it can modify it, if desired, but since it is a copy, it cannot modify the original argument.Call by reference is where the argument's address (or some kind of reference to it, see the clarification below) is copied to the formal parameter, which is then passed to the function. While the function is executing, it can see the original argument, and it can modify it, if desired.Note that, formally, C and C++ are always call by value. When we use so-called call by reference semantics, whether it is explicit like in C, or implicit like in C++, we are simply treating the address of the argument as the value that is copied, but when you get into the nitty gritty details of the calling sequence, it is always call by value.As a clarification, because terminology is critical here, what we do in C and C++ is actually call by value or call by address, not call by reference. The distinction is important when you get into managed heap languages like Java and .NET, where the formal parameter is actually a reference handle to some object in the heap, and not actually a value nor an address.


What is MTU value for DSI?

I'm using my hotspot for my DSi XL... What should I put my MUT value at???


How do you unpause virtual families on iPod touch?

Go to the main menu and click options. Then it should give you a list of options and pause game should be one of them. If your game is paused, the yes box should be filled. Change it to No and return to your game. It should be unpaused now.


How do you return dogz on dogz 5?

Hi um when u let yr dogz out click the little picture that will ither b pink or blue on da case and it will come up with da dogs details, u should see a 'return' button