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 |
sir plz send me a set of questions that been frequently held in written examination during campus selection.
if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?
What is persistence in oop?
Advantage and disadvantage of routing in telecom sector
what is the diffrence between c# and c++
write a programe to calculate the simple intrest and compund intrest using by function overlading
i had specified the access specifier for abstarct class member like (pure virtual function) as private.But it can be accessed by the derived class.How the private member of one class is accessed by other class.if any body face this problem and found the solution plz reply to me.
What is oops in simple words?
Give two or more real cenario of virtual function and vertual object
Why multiple inheritance is not allowed?
how to tackle technical questions
What is the default size allocated for array in the statement if size not specified " int a[] "