[algogeeks] Re: conditional compilation

2011-07-02 Thread himanshu kansal
Ya its cleard nw.. Thnx..:) On 7/2/11, Dumanshu duman...@gmail.com wrote: In ur second code change int i=2 and run it. It would still print bye. check the result of preprocessor using -E flag. On Jun 30, 4:46 pm, himanshu kansal himanshukansal...@gmail.com wrote: 1 more thngif its

[algogeeks] Re: conditional compilation

2011-07-01 Thread himanshu kansal
If i do #if i==0 thn it vl cmpl it..means its tkng it as 0..bt why... On 7/1/11, Dumanshu duman...@gmail.com wrote: i think it will take a garbage value for i because these are preprocessor directives. On Jun 30, 4:46 pm, himanshu kansal himanshukansal...@gmail.com wrote: 1 more thngif

Re: [algogeeks] Re: conditional compilation

2011-07-01 Thread shady
please don't use sms language some people are not well versed with it :D On Sat, Jul 2, 2011 at 12:38 AM, himanshu kansal himanshukansal...@gmail.com wrote: If i do #if i==0 thn it vl cmpl it..means its tkng it as 0..bt why... On 7/1/11, Dumanshu duman...@gmail.com wrote: i think it

[algogeeks] Re: conditional compilation

2011-07-01 Thread Dumanshu
@himanshu: preprocessor is a program which is called by the compiler before the actual compilation. see, for the preprocessor directive #if there is a condition that it should be followed by a constant because it is evaluated before compiling the program. Now these constants can be constant say

[algogeeks] Re: conditional compilation

2011-07-01 Thread Dumanshu
In ur second code change int i=2 and run it. It would still print bye. check the result of preprocessor using -E flag. On Jun 30, 4:46 pm, himanshu kansal himanshukansal...@gmail.com wrote: 1 more thngif its possible to eval. variable expression lyk abv... thn... int i=2; #if i==2

[algogeeks] Re: conditional compilation

2011-06-30 Thread himanshu kansal
1 more thngif its possible to eval. variable expression lyk abv... thn... int i=2; #if i==2 printf(hi); #else printf(bye); //prints byei think it shld print hi... #endif even this code prints bye. int i=3; #if i==2 printf(hi); #else printf(bye); #endif On Thu, Jun 30, 2011 at

[algogeeks] Re: conditional compilation

2011-06-30 Thread Dumanshu
i think it will take a garbage value for i because these are preprocessor directives. On Jun 30, 4:46 pm, himanshu kansal himanshukansal...@gmail.com wrote: 1 more thngif its possible to eval. variable expression lyk abv... thn... int i=2; #if i==2 printf(hi); #else printf(bye);