If we declare two macro with the same identifier without
doing undef the first, what will be the result?
eg: #define MAX_SIZE 100
#define MAX_SIZE 200

int table1[MAX_SIZE];

Answer Posted / ahmed

It will be 200
This is why #define is considered as unsafe type when
compared to const variables

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Should a constructor be public or private?

537


Which programming language is best to learn first?

582


Why do we use templates?

595


Define the process of handling in case of destructor failure?

578


What is the default width for ouputting a long integer using the insertion operator?

687






What is constructor and destructor in c++?

617


What is c++ array?

547


Is java a c++?

559


What is pure virtual function?

624


What is searching? Explain linear and binary search.

583


When does a 'this' pointer get created?

616


Is c++ a float?

604


What is the use of 'using' declaration in c++?

623


Tell me what are static member functions?

612


Can we use this pointer inside static member function?

627