You can also use 
 
if(i!=5)

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Paul Crate
Sent: Tuesday, February 06, 2007 5:49 PM
To: [email protected]
Subject: RE: [c-prog] C objective...



you are entering the if statement because you are performing an
assignment at the start of the if and not a comparison.
 
What you want to do is
 
if (i == 5)
 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Saswat Praharaj
Sent: 06 February 2007 12:24
To: [email protected]
Subject: Re: [c-prog] C objective...



Aren't you getting a warning on line 4 of your program ?

-Saswat

On Tue, 2007-02-06 at 09:38 +0000, ranjan kumar ojha wrote: 

        int main()
        {
             int i=4;
             if(i=5)
             {
                   printf(" Hi Ranjan ");
             }
             return 0;
        }
        
        Its answer is Hi Ranjan can anyone explain it????
        
        
        
        
________________________________


        The all-new Yahoo! Mail
<http://us.rd.yahoo.com/mail/uk/taglines/default/nowyoucan/free_from_isp
/*http://us.rd.yahoo.com/evt=40565/*http://uk.docs.yahoo.com/nowyoucan.h
tml>  goes wherever you go - free your email address from your Internet
provider.
        
        
        

        

 

Reply via email to