Mastering C++: 2026 All-In-One Quiz – Ace 'Thinking in C++' with Comprehensive Practice!

Session length

1 / 805

What must a function in C++ always end with?

End keyword

A return statement

A The End keyword is not part of C++ language.

B: This is the correct answer as every function in C++ must return some value or use keyword void to represent no value to the calling function.

C: A semicolon is used to end statements in C++ but it is not necessary to end a function with a semicolon.

D: Braces are used to define a block of code, in the case of a function it defines the scope of the function but it is not necessary to end a function with braces.

Get further explanation with Examzify DeepDiveBeta

A semicolon

Braces

Next Question
Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy