What is the difference between const and constexpr?
Answers were Sorted based on User's Feedback
Answer / nashiinformaticssolutions
• const: Value remains constant; evaluated at runtime.
• constexpr: Evaluated at compile time for optimization.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / nashiinformaticssolutions
o const: The value is constant and determined at runtime or compile-time.
o constexpr: The value is constant and must be computed at compile-time.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / glibwaresoftsolutions
• const: Value remains constant; evaluated at runtime.
• constexpr: Evaluated at compile time for optimization.
| Is This Answer Correct ? | 0 Yes | 0 No |
• const: Value remains constant; evaluated at runtime.
• constexpr: Evaluated at compile time for optimization.
| Is This Answer Correct ? | 0 Yes | 0 No |
Why do we use classes in programming?
Difference between delete and delete[]?
5 Answers Infosys, TCS, Virtusa,
How the delete operator differs from the delete[]operator?
without if else statement can be written ah
What is a "RTTI"?
Is c++ low level?
Is java easier than c++?
why c++ is not called strictly d super set of c?
Explain unexpected() function?
What is meant by iomanip in c++?
Write syntax to define friend functions in C++.
How can you specify a class in C++?