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 |
Is atoi safe?
Tell me difference between constant pointer and pointer to a constant.
Can we sort map in c++?
What are put and get pointers?
What is command line arguments in C++? What are its uses? Where we have to use this?
What are the 3 levels of programming languages?
What is heap sort in c++?
What are the operators in c++?
Why pointer is used in c++?
Can we use struct in c++?
why and when we can declar member fuction as a private in the class?
Why preincrement operator is faster than postincrement?