What is difference between #define and const?
Answers were Sorted based on User's Feedback
Answer / sarath
#define is the macro,const is modifier forexample const is
used in theb program we can not modify the data
Is This Answer Correct ? | 10 Yes | 1 No |
Answer / sirin
#define MAX 100 - create constant with no type information
const int max = 100 - with type information
Is This Answer Correct ? | 6 Yes | 0 No |
Answer / chitransha seth
with # define u can always undefine the variable by using
# undef but a const once defined cannot be altered
Is This Answer Correct ? | 3 Yes | 2 No |
3. Differentiate verification and validation.
What are objects in oop?
What is data binding in oops?
what i oops concept, how many languages supports oops concept?
What is a class oop?
What does the code "cout<<(0==0);" print? 1) 0 2) 1 3) Compiler error: Lvalue required
Write a program to reverse a string using recursive function?
What are callback functions in c++
Which is the parameter that is added to every non-static member function when it is called?
difference between static and non-static variables?
What is balance factor?
What is a macro? And how is a macro same as a template?