Void | SoloLearn: Learn to code for FREE!

+1

Void

what us void ?

10/14/2016 2:55:58 AM

Aman Khan

9 Answers

New Answer

+5

Void as a return value means that the function doesn't return anything. For example: void printn(int n) { cout << n << endl; } When void is in the parameter field, it means that the function doesn't take any parameter. For example: int getAnswer(void) { return 42; }

+2

no return value

+2

void print() { cout<<"Hello world"; } This function just prints the text on the screen, it returns nothing. That's when you use void, when you don't need to return anything.

+1

it means that the function it is attached to will not return anything. (such as an int or double)

+1

What does the statement "return nothing means " .

0

void defines a function initialization within class

0

Freer útfc btytvt5t tvffft6tyvy

-1

no return value

-2

it is used to initialise the body of of program.