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 an iterator class in c++?
Differentiate between a constructor and a destructor in c++.
What is the difference between delegation and implemented-in-terms-of?
What is problem with Runtime type identification?
Can we use pointers in c++?
i want to know how to copy arrary without using any method or function. I have tried the below using System; class e4 { static void Main(string[] args) { int a,b; int[ ] m= new int[5]; int[ ] n= new int[5]; for(a=0;a<=4;a++) { Console.WriteLine("enter any value"); m[a]=Convert.ToInt32(Console.ReadLine()); m[a]=n[a]; } for(b=0;b<=4;b++) { Console.WriteLine(n[b]); } } } but it will give wrong result can anyone solve this problem
Write a corrected statement in c++ so that the statement will work properly. if (x = y) x = 2*z;
What is the use of cmath in c++?
Is eclipse good for c++?
Can create new c++ operators?
What is the basic difference between C and C++?
What is "strstream" ?