What keyword is used in C++ to indicate that a function does not return a value?

Challenge your C++ knowledge with a comprehensive quiz based on 'Thinking in C++'. Explore a variety of multiple choice questions with hints and explanations to solidify your understanding. Get prepared!

The keyword "void" is used in C++ to indicate that a function does not return a value. Options A, C, and D are incorrect because they are either not keywords in C++ or do not accurately describe a function that does not return a value. For example, "null" is not a keyword in C++ and "empty" and "none" do not explicitly indicate that a function does not return a value. Therefore, "void" is the best keyword to use in this scenario.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy