cse-icons 0 Report post Posted January 10, 2005 Hello friends,Here is another one of C Question..... (This is a pretty easy one...... if u think in the right direction. Give it a try...) main()[/br]{[br][/br] if (<CONDITION>)[br] {[/br] printf("if");[br] }[/br] else[br] {[/br] printf("else"); }[br][/br]} Fill in the condition to get the output value : ifelseRegards, Share this post Link to post Share on other sites
osknockout 0 Report post Posted January 10, 2005 a)you're boredb)you're a true newbie looking for practicec)you're a comp student :rolleyes:Isn't it a bool? Share this post Link to post Share on other sites
cse-icons 0 Report post Posted January 11, 2005 a)you're bored b)you're a true newbie looking for practice c)you're a comp student Isn't it a bool? <{POST_SNAPBACK}> a)not bored, posted it coz.. i liked the ques...B)i am not a newbie.. c)and yeah, i have finished my comp science course... in c languge.. nything not equal to 0 in an if condition is true... got the hint.... if u directly insert a value there...... it will print either "if" or "else" but what i need is "ifelse"......... Share this post Link to post Share on other sites
s243a 0 Report post Posted January 11, 2005 how about:printf("if")==0 Share this post Link to post Share on other sites
cse-icons 0 Report post Posted January 11, 2005 how about: printf("if")==0 <{POST_SNAPBACK}> That's the answer.... Good thinking..... Share this post Link to post Share on other sites