Results 1 to 10 of 14
-
11th Feb 2012, 03:53 PM #1OPBannedWebsite's:
cityvillehelp.comTurbo C | Weird and amazing
Why the output of the following program comes False
PHP Code:#include<stdio.h>
void main()
{
int a=15, b=10, c=5;
if(a>b>c)
printf("True");
else
printf("False");
}
plzz tell me ... help neededprateek Reviewed by prateek on . Turbo C | Weird and amazing Why the output of the following program comes False #include<stdio.h> void main() { int a=15, b=10, c=5; if(a>b>c) printf("True"); else printf("False"); Rating: 5
-
11th Feb 2012, 03:55 PM #2MemberWebsite's:
wscripts.net damnlolscript.com lulzjet.comi don't know c but i don't think is possible to compare 3 values at once
maybe a>b and a>c and b>c
-
11th Feb 2012, 03:56 PM #3OPBannedWebsite's:
cityvillehelp.comi don't know c but i don't think is possible to compare 3 values at once
maybe a>b and a>c and b>c
but when I write
if(a>b>>c)
the output becomes true ??
whyy ??
-
11th Feb 2012, 04:03 PM #4MemberWebsite's:
mnchost.com
-
11th Feb 2012, 04:03 PM #5Respected Member
the whole concept of your program is wrong, how can you compare values without getting an input from an user and claim it as true or false ?
If you get an input from an user, and ask for "true or false", that has some sense. If you get my point and agree with what i say, then this must be the program :
Code:#include<stdio.h> void main() { int a,b,c; scanf(%d %d %d, &a, &b, &c); if(a>b&&a>c) printf("True"); else printf("False"); }
Code:#include<stdio.h> void main() { int a,b,c; scanf(%d %d %d, &a, &b, &c); if(a>b&&a>c) printf("A is Big"); else if(b>c) printf("B is Big"); else printf("C is Big"); }
-
11th Feb 2012, 04:05 PM #6MemberWebsite's:
mnchost.com
-
11th Feb 2012, 04:07 PM #7OPBannedWebsite's:
cityvillehelp.comFroomple
actually my exam is next week
i got some previous year questions and tried to solve them
and found this question
the question was what was the output of the program ..
thanks to all of you epecially Techking
rep added for all
edit
techking
i can't give rep to u
You must spread some Reputation around before giving it to Techking again.
-
11th Feb 2012, 04:09 PM #8
-
11th Feb 2012, 04:10 PM #9MemberWebsite's:
mnchost.comWe can do anything in C ?
for more advanced interesting puzzles specially for microsoft/google interviews ,you can go with
http://www.techmantr.in/c.php
-
11th Feb 2012, 04:11 PM #10MemberWebsite's:
mnchost.comPM me too..
always welcome ..
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Md5 generation on Turbo C
By prateek in forum Web Development AreaReplies: 5Last Post: 14th Feb 2012, 08:42 PM -
Turbo C | scanf() | strange
By prateek in forum Web Development AreaReplies: 14Last Post: 14th Feb 2012, 04:24 PM -
Turbo C | Help Needed
By prateek in forum Web Application/Script SupportReplies: 17Last Post: 12th Jan 2012, 12:26 PM -
[Selling] YaSs3r37's GFX Shop Now Open | Amazing Service At Amazing Prices|
By yasser37 in forum Completed TransactionsReplies: 3Last Post: 1st Aug 2011, 03:06 PM -
YaSs3r37's GFX Shop Now Open | Amazing Service At Amazing Prices|
By yasser37 in forum Graphics AreaReplies: 1Last Post: 29th Jul 2011, 09:20 PM
themaManager - edit and manage...
Version 4.04 released. Open older version (or...