Sunday, August 2, 2009

One c ques. is here?

if(r=5!=4)


printf("inside");


else


printf("outside");


printf("%d",r);





pls give the output, there is no error in progm, pls explain it also.

One c ques. is here?
"Overconfidence sinks empires"





There *are* mistakes.....


( r=5!=4) does not make any sense.For comparing two quantities we use ==


= is assignment operator.


and what do u wanna do?


if you want to print "inside" when r==4 then write this-


if(r==4)


------


-----





Better places to post such questions:


http://www.dev-spot.com/forums/


http://www.cprogramming.com/board.html
Reply:in a nutshell





if r = 5 print("inside") else if r = 4 print("outside"), etc.

garden flowers

No comments:

Post a Comment