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

Which of the following is not a valid declaration for main() a) int main() b) int main(int argc, char *argv[]) c) They both work

613


What is abstraction c++?

597


Why c++ is faster than java?

602


Is c++ low level?

584


Define a constructor?

599






what is the difference between linear list linked representaion and linked representation? what is the purpose of representing the linear list in linked represention ? is it not avoiding rules of linear represention?

1757


What is near, far and huge pointers? How many bytes are occupied by them?

665


What is iomanip c++?

604


What does flush do?

568


Explain the concept of dynamic allocation of memory?

623


which one is equivalent to multiplying by 2:Left shifting a number by 1 or Left shifting an unsigned int or char by 1?

728


Why can’t you call invariants() as the first line of your constructor?

568


What is meant by entry controlled loop? What all C++ loops are exit controlled?

574


What are the various oops concepts in c++?

606


What are the extraction and insertion operators in c++?

571