How can we use the preprocessor #if and #elseif.
Answers were Sorted based on User's Feedback
Answer / som shekhar
Take the following example where i assume that table size
has been defined previosly but at some part of time i want
to change it..but the table size is defined in some other
module and you dont have an access to it.
#if TABLE_SIZE>200
#undef TABLE_SIZE
#define TABLE_SIZE 200
#elif TABLE_SIZE<50
#undef TABLE_SIZE
#define TABLE_SIZE 50
#else
#undef TABLE_SIZE
#define TABLE_SIZE 100
#endif
int table[TABLE_SIZE];
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / som shekhar
Take the following example where i assume that table size
has been defined previosly but at some part of time i want
to change it..but the table size is defined in some other
module and you dont have an access to it.
#if TABLE_SIZE>200
#undef TABLE_SIZE
#define TABLE_SIZE 200
#elif TABLE_SIZE<50
#undef TABLE_SIZE
#define TABLE_SIZE 50
#else
#undef TABLE_SIZE
#define TABLE_SIZE 100
#endif
int table[TABLE_SIZE];
| Is This Answer Correct ? | 0 Yes | 1 No |
When you define a integer it gets stored in which data structure?(Stack or a heap)
Why is there no multiple inheritance?
How many types of access specifier in c# and vb.net?
How is exception handling carried out in c++?
What is destructor in oop?
What is coupling in oops?
How to call a non virtual function in the derived class by using base class pointer
Why it is called runtime polymorphism?
What is differance between Abstract and Interface
How to create a comment page in C #??
What is the difference between static polymorphism and dynamic polymorphism?
what is the size of an empty class