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 |
Give two or more real cenario of virtual function and vertual object
What are oops methods?
how to tackle technical questions
What do you mean by binding of data and functions?
what are the realtime excercises in C++?
who is the father of OPPS
write a program to find the largest of two numbers without using for,while,switch,if else, conditional operator and do while using c++ pgmng language
What is interface in oop?
create a class complex having real and imaginary part of a complex no. as a data member. overload the binary operators(+,- and *) to perform the operations on complex no. objects. overload binary operator using friend function.
2 Answers CTS, Delhi University,
what is a virtual class?
5 Answers Cap Gemini, IBM, Infosys, Trinity Technologies,
how does a main() in C++ is different from main() in C?
What makes a language oop?