What keyword is used to declare a function without any return type?
- function
- int
- none
- void
In C# and many other programming languages, the keyword void is used to declare a function that doesn't return any value. Functions declared with void indicate that they perform a task but don't produce a result that needs to be returned.
Loading...
Related Quiz
- Samantha encounters a scenario where she needs to exit out of multiple nested loops upon a particular condition. What programming construct can she use to achieve this efficiently?
- Which C++ statement is used to make a single conditional decision?
- For a function whose return type is deduced at the time of its invocation, the keyword ______ is used.
- A friend function is defined outside the class but has the ability to access the _______ members of the class.
- Default arguments should be avoided in virtual functions as they don’t behave as most people expect and can lead to ________.