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 |
The company is a fake company asking for money of RS10000 while training and not offering a job after training. My humble request to you people not to attend Astersys interview
What is class and object in oops?
How is data security provided in Object Oriented languages? ?
create a c++ program that will accepts 9 inputs using 3 by 3 array.
What makes a language oop?
What is difference between pop and oop?
What is destructor example?
Why oops is important?
what is the use of classes in c++;
What is the difference between procedural programming and oops?
define a string class. overload the operator == to compare two strings
2 Answers Birla, Ericsson, HCL, Infosys, Infotech, MCAS, Satyam,
IS IT NECESSARY TO INITIALIZE VARIABLE? WHAT IF THE INSTANCE VARIABLE IS DECLARED final ? IS IT NECESSARY TO INITIALIZE THE final VARIABLE AT THE TIME OF THEIR DECLARATION?