[algogeeks] Explain the o/p

2011-06-29 Thread ashwini singh
please ex-plain the o/p of each line o/p is 2 23 2 0 3 2 2 2 23 2 3 #includestdio.h #includeconio.h main() { int i; i=printf(%d %d,2,2) printf(%d %d ,3,2); printf(\n%d,i); printf(\n%d\n,3,4); printf(%d %d ,2,2); printf(\n%d,printf(%d %d,2,2)

Re: [algogeeks] Explain the o/p

2011-06-29 Thread rajeev bharshetty
@ashwini singh Printf() returns the number of values printed to the output so printf(%d %d,2,2) returns 3 and the second printf returns 4 so bitwise and of 3 and 4 is 0 so i is o . Similar explanation to further printf statements . Regards Rajeev N B I Blog @ www.opensourcemania.co.cc On Wed,

Re: [algogeeks] Explain the o/p

2011-06-29 Thread rajeev bharshetty
@ashwini singh Printf() returns the number of values printed to the output so printf(%d %d,2,2) returns 3 and the second printf returns 4 so bitwise and of 3 and 4 is 0 so i is 0 . further printf statements print the values and the last two printf statements have 3 3 so answer is 3. Regards

[algogeeks] Explain the o/p

2011-06-15 Thread Nishant Mittal
//Prog 1 #includestdio.h int main() { float a=75.7; printf(%.10f\n,a); //prints 75.669482 if(75.7a) printf(Hi); else printf(Hello); return 0; } //Prog 2 #includestdio.h int main() { float a=275.7; printf(%.10f\n,a);//prints 275.7000122070 *WHY???* if(275.7a) printf(Hi); else

[algogeeks] Explain the o/p

2011-03-04 Thread Nishant Agarwal
#includestdio.h main() { long x; float t; scanf(%f,t); printf(%d\n,t); x=90; printf(%f\n,x); { x=1; printf(%f\n,x); { x=30; printf(%f\n,x); } printf(%f\n,x); } x==9; printf(%f\n,x); }