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 |
What is inheritance write a program to show use of inheritance?
Name a typical usage of polymorphism
What is a null tree?
what is virtual function in c++
design class for linked list and include constructor,destructor,insert option. node of form struct node { int data; struct node &ptr; }
What is oop in simple words?
The expansion of GNU
What is static modifier?
What is the main feature of oop?
What is the difference between XML Web Services using ASMX and .NET Remoting using SOAP?
why in java first invoke public static void main(String args[]) method????Why not public static void method1(String args[])??
what is meant by files?