No.. It is not possible at any point
no, every function can not return a value. for example void name() { cout<<"Hello world"; } this function does not return any value due to the key word void that tells the compiler that the function does not returns a value.
void as function return-type means no return value void as function parameter means no parameter void * as pointer type means generic pointer
when we declare any function with void,it doesnt return any value
In Java, this keyword is used to specify that the method has no return value.
Void means there is no data type. So if you have a void function it does not return a value (and attempting to do so will cause an error) whereas a non-void function (ex. int, long, String, bool, etc) will return a value of that type.
no, every function can not return a value. for example void name() { cout<<"Hello world"; } this function does not return any value due to the key word void that tells the compiler that the function does not returns a value.
void as function return-type means no return value void as function parameter means no parameter void * as pointer type means generic pointer
when we declare any function with void,it doesnt return any value
In Java, this keyword is used to specify that the method has no return value.
Void means there is no data type. So if you have a void function it does not return a value (and attempting to do so will cause an error) whereas a non-void function (ex. int, long, String, bool, etc) will return a value of that type.
void abc(int); is a function declaration. The declared function has no return value, is named abc and accepts one integer argument by value.
It is up to you to decide. You may go for 'void' return type, which means no return value.
void is used by functions that do not return a value. For example: // This function returns an integer, which you can use in other functions int addTwoNumbers(int a, int b) { return(a + b); } // This function does not return a value, so we declare it as a void void printSum(int a, int b) { cout << a << " + " << b << " = " << addTwoNumbers(a, b) << endl; // Note that attempting to return a value here will cause an error. }
You don't use 'VOID', but 'void'. It means different things, such as:- void as function type means no return value- void as function parameter means no parameters- 'void *' as pointer-types means generic pointer
It's void, and you use is for different purposes, like:a function doesn't have return value: void fun () ...a function doesn't have parameters: ... fun (void) ...generic pointe: void *ptr;r
what is void data type Void is an empty data type normally used as a return type in C/C++, C#, Java functions/methods to declare that no value will be return by the function. The another use of void is to declare the pointer in C/C++ whe It is not sure that what data type will be addressed by the pointer. eg: void *p; Here p can hold the address of int or float or char or long int or double.
By returning a value. Or using type 'void'.