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 |
What is design patterns in C++?
What is cohesion in oop?
They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?
write a program that takes input in digits and display the result in words from 1 to 1000
What does and I oop mean in text?
what is the virtual function overhead, and what is it used for ? i hope i can get and appropriate answers, thanks a lot....
Why do pointers exist?
Describe the difference between a Thread and a Process?
Difference between vector and array
what are the realtime excercises in C++?
Why is there no multiple inheritance?
What is stream in oop?