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 |
What is DlgProc?
write program for palindrome
81 Answers Amazon, Aricent, CSC, GE, HCL, Infosys, Syntel, Temenos, Wipro,
Give the difference between the type casting and automatic type conversion. Also tell a suitable C++ code to illustrate both.
difference between c and c++?
38 Answers Cognizant, IBM, Infosys, Oracle, Sarva Shiksha Abhiyan, Wipro,
What is size of a empty class?
7 Answers Microsoft, Tata Elxsi, Wipro,
What is the maximum combined length of command line arguments including the space between adjacent arguments?
What happens if an exception is throws from an object's constructor and from object's destructor?
What are the comments in c++?
Comment on c++ standard exceptions?
How to create a pure virtual function?
what is the diff b/n c and c++ a. dynamic scoping b. nested switching c. declaration of variables in any code block d. separation of compilation and linking
What is a literal in c++?