InterviewSolution
| 1. |
When Is The Void? Keyword Used In A Function? |
|
Answer» ‘void’ is USED to INDICATE the empty value. We often SEE ‘void’ KEYWORD is used before a function definition. It indicates that the function will not return any value. If we need to return a value then the ‘void’ keyword will be replaced by the data type of the returned value. Example- we can use INT main() instead of void main() to indicate that it will return integer value. ‘void’ is used to indicate the empty value. We often see ‘void’ keyword is used before a function definition. It indicates that the function will not return any value. If we need to return a value then the ‘void’ keyword will be replaced by the data type of the returned value. Example- we can use int main() instead of void main() to indicate that it will return integer value. |
|