What is difference between #define and const?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you explain polymorphism?

576


how to get the oracle certification? send me the answer

1660


write a programe to calculate the simple intrest and compund intrest using by function overlading

1659


What is destructor give example?

595


what is the drawback of classical methods in oops?

2909






Write a program to compute for numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the following format: Each line contains a student's first name, then one space, then ten quiz scores all on one line. The quiz scores are in whole number and are separated by one space. Your program will take it input from this file and sends it output to a second file. The data in the output file will be exactly the same as the data in the input file except that there will be one additional number (of type double) at the end of each line. This number will be the average of the student's ten quiz scores. Use at least one function that has file streams as all or some of its arguments.

2567


Advantage and disadvantage of routing in telecom sector

780


what type of questions

1689


What is the types of inheritance?

594


What is stream in oop?

835


why reinterpret cast is considered dangerous?

1894


Write a program to implement OOPS concepts such as inheritance, polymorphism, friend function, operator overloading?

4233


How do you achieve polymorphism?

607


Why is there no multiple inheritance?

562


Why is polymorphism used?

577