I must say I made a fast reply thinking this is a trick question on my first
days in the group, a great programming myth getting both options executed on
a "if - else" statement, please dont tell me there are printing errors in
ALL the introduction programming books ever printed.

So I just slapped the question straight from the email into my C/C++ program
and was blown away in seconds that my basic programming knowledge had not
changed since I first learnt them, I completely forgot about the  "%s" in
the printf ("%s", "A string");

I did think of changing printf to cout, but thought lets just take this step
by step to see what errros come up, and there was none on my old  Dev-C
4.9.9.2  program.

Has someone got a better replacement I did not want to spend $x000's on a
replacement C/C++ program





>From Eric



----- Original Message -----
From: Paul Herring <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, October 24, 2008 10:46 PM
Subject: Re: [c-prog] Re: reply for :::execute if else simultaneous


On Fri, Oct 24, 2008 at 10:19 AM, Tamas Marki <[EMAIL PROTECTED]> wrote:
> On Fri, Oct 24, 2008 at 8:23 AM, Satish Bharadwaz <[EMAIL PROTECTED]>
wrote:
>> if(printf("true"))
>> printf("false");
>> else
>> printf("false");
>>
>> here d printf statement inside  d if statement returns d no of characters
>> dat is being printed so as a result the printf statement wud return an
>> integer value which is non zero hence d control enters d body  of d if
>> statement
>
> What language is this?

Looks like a mixture of C and ESL.

--
PJH

http://shabbleland.myminicity.com/

------------------------------------

To unsubscribe, send a blank message to
<mailto:[EMAIL PROTECTED]>.Yahoo! Groups Links





--
No virus found in this incoming message.
Checked by AVG.
Version: 7.5.549 / Virus Database: 270.8.2/1742 - Release Date: 23-Oct-08
15:29



Reply via email to