Total members 10249 | Gratitudes |It is currently Thu May 17, 2012 8:01 am Login / Join Codemiles


All times are UTC [ DST ]




Post new topic Reply to topic  Quick reply  [ 3 posts ] 
Author Question
 Question subject: execute if else simultaneously
PostPosted: Fri Nov 07, 2008 5:44 pm 
Offline
Proficient
User avatar

Joined: Sun Oct 19, 2008 3:47 pm
Posts: 281
Has thanked: 0 time
Have thanks: 1 time

"a c or c++ code which executes both 'if' and 'else' statements
simultaneously.

if the code is

Code:
if(a==b)
cout<<"true\n";
else
cout<<"false";


OUTPUT should be:-

true
false


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: execute if else simultaneously
PostPosted: Fri Nov 07, 2008 5:45 pm 
Offline
Proficient
User avatar

Joined: Sun Oct 19, 2008 3:53 pm
Posts: 229
Has thanked: 0 time
Have thanks: 0 time
Never happens. if else are seperate blocks of one satatement/instr.


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: execute if else simultaneously
PostPosted: Fri Sep 16, 2011 5:23 am 
Although I haven't given the below code a try but logically I think it'll give the expected output..


if(!printf("hello "))
{ }
else
printf("world\n");


the output should come as :---
hello world


TOP
  
Reply with quote  
Post new topic Reply to topic Quick reply  [ 3 posts ] 
Quick reply


  

 Similar topics
 @NamedNativeQuery:SQLGrammarException could not execute quer
 Execute System Commands
 calculating time required to execute function

All times are UTC [ DST ]


Users browsing similar posts

Users browsing this forum: Google Adsense [Bot] and 2 guests



Jump to:  
Previous Question | Next Question 




Home
General Talks
Finished Projects
Code Library
Games
Tutorials

Java
C/C++
C-sharp
php
Script
JSP/Servlets
Ajax
ASP/ASP.net
Google SEO
Database
Communications
Phpbb3 styles
Photoshop tutorials
Flash tutorials
Find a job






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team