If he's asking about a simple if statement, you proly just caused 50000 more questions with your pointer trick. :)
Thanks, Tyler Littlefield email: [EMAIL PROTECTED] web: tysdomain-com Visit for quality software and web design. skype: st8amnd2005 ----- Original Message ----- From: py2akv To: [email protected] Sent: Friday, October 17, 2008 10:03 PM Subject: [c-prog] Re: what's the condition for Hello world.... HelloWorld never! Hello OR World, but never both at the same time! If "condition" yields a ZERO OR ITS EQUIVALENT, then you may say it's NOT fulfilled. If "condition" yields ANYTHING ELSE THAN ZERO OR ITS EQUIVALENT, then you may say it's TOTALLY fulfilled. char s[6]="Jugal"; // The null character is at the end, s[6] if (s[6]) cout << "ANYTHING ELSE THAN ZERO"; else cout << "ZERO"; // Prints ZERO if (*(s+6)) cout << "ANYTHING ELSE THAN ZERO"; else cout << "ZERO"; // Prints ZERO if (-1.23456) cout << "ANYTHING ELSE THAN ZERO"; // Prints ANYTHING ELSE THAN ZERO else cout << "ZERO"; Best, Geraldo --- In [email protected], "jugal_panchal" <[EMAIL PROTECTED]> wrote: > > what is condition so we will get HelloWorld output in following code > > if "condition" > printf("Hello"); > else > printf("World"); > [Non-text portions of this message have been removed]
