COMP-3400 Final Exam Questions And
Answers Latest 2025
C++ was created by _________ at Bell Labs in 1979. -
correct answer ✅Bjarne Stroustrup
Which of the following sentences best describes part of the
language philosophy of the ISO C++ committee:
a) It is less important to allow a useful feature than to permit
misuse.
b) It is less important to allow a useful feature than to prevent
every misuse.
c) It is more important to allow a useful feature than to permit
misuse.
d) It is more important to allow a useful feature than to prevent
every misuse. -
correct answer ✅D
C++ has as a language design objective, the position that
preprocessor usage should be eliminated.
,COMP-3400 Final Exam Questions And
Answers Latest 2025
Give a scenario when the preprocessor must be used in C++ since
there is no way to do such within the language. -
correct answer ✅It must be used to establish #include guards.
Mr. X proposes to the ISO C++ committee a really cool language
feature that he would like to see added to C++. At the ISO meeting,
people ask Mr. X to explain how his proposal does not run afoul of
the zero-overhead rule.
Clearly explain what the Zero-Overhead rule as a language design
objective means with respect to C++. -
correct answer ✅The zero overhead rule is the language design
guideline that if you don't use a language feature then there is no
overheads present in the generated code with respect to that
feature.
Briefly explain what std::cerr is. -
correct answer ✅std::cerr is a global std::ostream object that
writes its output to standard error.
, COMP-3400 Final Exam Questions And
Answers Latest 2025
Briefly explain what the main practical difference is between the
modular programming paradigm and the object-based paradigm. -
correct answer ✅A module in modular programming permits only
one instance of the module.
Object-based can have an arbitrary number of instances.
Clearly explain what the generic programming paradigm is. -
correct answer ✅The generic programming paradigm allows one
to specific type/constant parameters associated with the definitions
of programming constructs.
When all parameters have been specified, the compiler/execution
environment generates the code for those definitions.
Suppose you have a type called MYTYPE. Write the correct
overloaded bit shift operator to handle reading MYTYPE from a C++
stream.
Your code must work for any character type and/or character trait
used with the stream. -
correct answer ✅template <typename Char, typename CharTraits>
Answers Latest 2025
C++ was created by _________ at Bell Labs in 1979. -
correct answer ✅Bjarne Stroustrup
Which of the following sentences best describes part of the
language philosophy of the ISO C++ committee:
a) It is less important to allow a useful feature than to permit
misuse.
b) It is less important to allow a useful feature than to prevent
every misuse.
c) It is more important to allow a useful feature than to permit
misuse.
d) It is more important to allow a useful feature than to prevent
every misuse. -
correct answer ✅D
C++ has as a language design objective, the position that
preprocessor usage should be eliminated.
,COMP-3400 Final Exam Questions And
Answers Latest 2025
Give a scenario when the preprocessor must be used in C++ since
there is no way to do such within the language. -
correct answer ✅It must be used to establish #include guards.
Mr. X proposes to the ISO C++ committee a really cool language
feature that he would like to see added to C++. At the ISO meeting,
people ask Mr. X to explain how his proposal does not run afoul of
the zero-overhead rule.
Clearly explain what the Zero-Overhead rule as a language design
objective means with respect to C++. -
correct answer ✅The zero overhead rule is the language design
guideline that if you don't use a language feature then there is no
overheads present in the generated code with respect to that
feature.
Briefly explain what std::cerr is. -
correct answer ✅std::cerr is a global std::ostream object that
writes its output to standard error.
, COMP-3400 Final Exam Questions And
Answers Latest 2025
Briefly explain what the main practical difference is between the
modular programming paradigm and the object-based paradigm. -
correct answer ✅A module in modular programming permits only
one instance of the module.
Object-based can have an arbitrary number of instances.
Clearly explain what the generic programming paradigm is. -
correct answer ✅The generic programming paradigm allows one
to specific type/constant parameters associated with the definitions
of programming constructs.
When all parameters have been specified, the compiler/execution
environment generates the code for those definitions.
Suppose you have a type called MYTYPE. Write the correct
overloaded bit shift operator to handle reading MYTYPE from a C++
stream.
Your code must work for any character type and/or character trait
used with the stream. -
correct answer ✅template <typename Char, typename CharTraits>