Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Programming Fundamentals/Void Data Type

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

Overview The void data type, similar to the Nothing data type described earlier, is the data type for the result of a function that returns normally, but does not provide a result value to its caller. Void is not the same as zero, void is not a number and cannot be in calculations.Wikipedia: Void type Discussion The void data type has no values and no operations. It’s a data type that represents the lack of a data type. LanguageReserved WordC++voidC#voidJavavoidJavaScriptvoidPythonN/ASwiftVoid Many programming languages need a data type to define the lack of return value to indicate that nothing is being returned. The void data type is typically used in the definition and prototyping of functions to indicate that either nothing is being passed in and/or nothing is being returned. In C and Javabaeldung.com: Void Type in Java, the void data type is required. In C++, the void can be used in a function's parameter list if it does not need to return a value. Key Terms void data type A data type that has no values or operators and is used to represent nothing. References cnx.org: Programming Fundamentals – A Modular Structured Approach using C++