•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C section within the Software Development category of DaniWeb, a massive community of 397,818 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,622 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C advertiser:
Views: 1004 | Replies: 7
![]() |
•
•
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 10,643
Reputation:
Rep Power: 36
Solved Threads: 867
any conditional statement that is either true or false. for example if you were asked to enter either 'Y' or 'N' (Yes or No) then the statement might read
if( answer == 'Y')
{
// true statement
}
else
{
// false statement
} I think it's about time we voted for senators with breasts. After all, we've been voting for boobs long enough. ~Clarie Sargent, Arizona senatorial candidate
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
•
•
Join Date: Feb 2007
Location: Bangalore, India
Posts: 535
Reputation:
Rep Power: 4
Solved Threads: 50
•
•
•
•
any conditional statement that is either true or false. for example if you were asked to enter either 'Y' or 'N' (Yes or No) then the statement might read
if( answer == 'Y') { // true statement } else { // false statement }
Thisnk it's a trick question. May be you didn't read it fully..
@mohiuddin.shaik
It is allowed to write/change anything other than ? e.g. can I use a goto inside the if block?
•
•
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 10,643
Reputation:
Rep Power: 36
Solved Threads: 867
you are right -- I didn't read the expected outcome, which is impossible. There is no solution that will give that outcome.
I think it's about time we voted for senators with breasts. After all, we've been voting for boobs long enough. ~Clarie Sargent, Arizona senatorial candidate
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
•
•
Join Date: Feb 2007
Location: Bangalore, India
Posts: 535
Reputation:
Rep Power: 4
Solved Threads: 50
•
•
•
•
you are right -- I didn't read the expected outcome, which is impossible. There is no solution that will give that outcome.
What abt GOTO LABEL?
c Syntax (Toggle Plain Text)
if ( true ) { cout << "Hi" << endl ; goto ELSE_PART ; } else { ELSE_PART: cout << " There" << endl ; }
of course that's cheating but then teh question is not fair..
Last edited by thekashyap : Mar 28th, 2007 at 11:23 am.
You have just gone out to show one of the horrors of using the GOTO statement in C/C++...
"I don't accept change. I don't deserve to live."
"Working a real job is a win if you're lazy, greedy, or unmotivated. If you're average, you fit right in. And if you're above average, the basic terms of employment and premise of the arrangement is against your interests."
"Working a real job is a win if you're lazy, greedy, or unmotivated. If you're average, you fit right in. And if you're above average, the basic terms of employment and premise of the arrangement is against your interests."
Seems simple enough
int main()
{
if (!printf("welcome ")) {
printf("welcome");
} else {
printf("to ieg");
}
return 0;
} If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
Do not PM me for help; You'll be ignored, or told to learn to read.
Do not ask me if I'm muslim - I'm not. Nor do I care about yours or anyone else's mysticism. Religion is a matrix, take the RED PILL.
Do not PM me for help; You'll be ignored, or told to learn to read.
Do not ask me if I'm muslim - I'm not. Nor do I care about yours or anyone else's mysticism. Religion is a matrix, take the RED PILL.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb C Marketplace
Similar Threads
- case statement (meaning of this block of code) (Shell Scripting)
- Counting the amount of letters in a phrase! (C++)
- changing colours (Java)
Other Threads in the C Forum
- Previous Thread: Need Help With Simple 'c' Program!!!
- Next Thread: Program help please



)
Linear Mode