What is difference between #define and const?

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is stream in oop?

1033


What is coupling in oops?

814


Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.

2198


Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)

1841


Why it is called runtime polymorphism?

778


What is coupling in oop?

767


Explain the advantages of inheritance.

863


Write a c++ program to display pass and fail for three student using static member function

3077


What is inheritance write a program to show use of inheritance?

856


Is html an oop?

767


What are the 3 pillars of oop?

847


What is use of overloading?

846


What is the renewal class?

2404


What is polymorphism and example?

769


design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)

6351