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

Disable ads (and more) with a premium pass for a one time $4.99 payment

Test your C++ skills with our quiz based on Bruce Eckel's 'Thinking in C++'. Dive into object-oriented programming, advanced topics, and fundamentals. Perfect for learners and experts alike. Assess your knowledge and become a C++ master!

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