[algogeeks] c-aps

2011-08-01 Thread Radhika Renganathan
HI, I'm seeking for a source for learning c-aps and i don get any valuable ones. Can anyone plz suggest me or share the valuable sources u know. Thank u in anticipation -- radhika .. :) -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. T

[algogeeks] C aps sources plz

2011-07-24 Thread ~*~VICKY~*~
Hi all, as i find it hard to find a site that has a collection of non obvious or fairly hard c aps sites anywhere, i seek help here. plz post if u find any source proving to be useful. -- Cheers, Vicky -- You received this message because you are subscribed to the Google Groups "Algorithm

Re: [algogeeks] c aps can some one explain this pls :)

2011-07-18 Thread DIPANKAR DUTTA
This depends on how the compiler evaluates the actual parameters and push to the stack when printf is called. this is totally depeding on the compiler architecture [ basically implemetion of activation record in intermediate code genaration phase, read intermidiate language and virtual machine @ co

Re: [algogeeks] c aps can some one explain this pls :)

2011-07-18 Thread keyan karthi
thanks ppl :) On Mon, Jul 18, 2011 at 3:59 PM, schrodinger <6fae1ce6347...@gmail.com>wrote: > AFAIK, official answer is "due to undefined behavior". > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To view this discussion on the web

Re: [algogeeks] c aps can some one explain this pls :)

2011-07-18 Thread schrodinger
AFAIK, official answer is "due to undefined behavior". -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To view this discussion on the web visit https://groups.google.com/d/msg/algogeeks/-/EAWuaDE1CIcJ. To post to this group, send email to al

Re: [algogeeks] c aps can some one explain this pls :)

2011-07-18 Thread sagar pareek
@keyan i examined many times in ubuntu that it delays the o/p of pre-increment :) but in dev C++ o/p is as given by atul On Mon, Jul 18, 2011 at 3:15 PM, keyan karthi wrote: > @boobal > can u pls elaborate on "sequence points" > @atul > i compiled this in ubuntu > > > On Mon, Jul 18, 2011 at 3:13

Re: [algogeeks] c aps can some one explain this pls :)

2011-07-18 Thread keyan karthi
@boobal can u pls elaborate on "sequence points" @atul i compiled this in ubuntu On Mon, Jul 18, 2011 at 3:13 PM, Boobal Subramaniyam wrote: > sequence points... > > > On Mon, Jul 18, 2011 at 3:11 PM, Amol Sharma wrote: > >> it's not defined in the standard.unpredictable behaviour !! >> -

Re: [algogeeks] c aps can some one explain this pls :)

2011-07-18 Thread Boobal Subramaniyam
sequence points... On Mon, Jul 18, 2011 at 3:11 PM, Amol Sharma wrote: > it's not defined in the standard.unpredictable behaviour !! > -- > > > Amol Sharma > Third Year Student > Computer Science and Engineering > MNNIT Allahabad > > > > > On Mon, Jul 18, 2011 at 2:36 PM, keyan karthi >

Re: [algogeeks] c aps can some one explain this pls :)

2011-07-18 Thread Amol Sharma
it's not defined in the standard.unpredictable behaviour !! -- Amol Sharma Third Year Student Computer Science and Engineering MNNIT Allahabad On Mon, Jul 18, 2011 at 2:36 PM, keyan karthi wrote: > #include > using namespace std; > > int main() > { > int p=1; > printf("%d %d %d %d",++p,p

Re: [algogeeks] c aps can some one explain this pls :)

2011-07-18 Thread atul purohit
In dev C++ output is coming 5 3 2 2 On Mon, Jul 18, 2011 at 2:36 PM, keyan karthi wrote: > #include > using namespace std; > > int main() > { > int p=1; > printf("%d %d %d %d",++p,p++,p++,++p); > } > > output : 5 3 2 5 > > -- > You received this message because you are subscribed to the Google G

[algogeeks] c aps can some one explain this pls :)

2011-07-18 Thread keyan karthi
#include using namespace std; int main() { int p=1; printf("%d %d %d %d",++p,p++,p++,++p); } output : 5 3 2 5 -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe f

Re: [algogeeks] C aps output

2011-05-20 Thread Alin Rus
On Fri, May 20, 2011 at 3:19 PM, siva viknesh wrote: > > main() > { > int i = 257; > int *iPtr = &i; > printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); > } > Answer: > 1 1 > i = 10001 first case *((char *)iPtr) cast to char 8 bits, discard first bit 0001 ==> 1 second *((char *)iPtr+1

[algogeeks] c aps ..output discrepancy !!!

2011-05-20 Thread siva viknesh
hi #include main() { int a=2,*f1,*f2; f1=f2=&a; *f2+=*f2+=a+=2.5; printf("\n%d %d %d",a,*f1,*f2); } for this code in code blocks IDE got 8 8 8 as op in http://ideone.com/ok850 got 12 12 12 in 175 c aps pdf it has been given as 16 16 16 as ou

[algogeeks] C aps output

2011-05-20 Thread siva viknesh
main() { int i = 257; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); } Answer: 1 1 main() { int i = 258; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); } Answer: 2 1 ..can anybody explain how?? -- Regards, $iva -- You received this message because y

Re: [algogeeks] c aps

2011-01-09 Thread Prateek Jain
the printf function returns 1 when it prints a string.. for (1;1&&i--;1) { printf("bat"); } note that i=2 has been cunningly initialized before. and the decrement of i has been done in middle expression of the for loop hence, actually its like for(;i--;) { } how many times will this execute? Twice

[algogeeks] c aps

2011-01-09 Thread siva viknesh
#include int main() { int i=2; for(printf("cat ");printf("rat ")&&i--;printf("mat ")) { printf("bat "); } } ouput : cat rat bat mat rat bat mat rat can anybody plz explain how we get this output?? -- Regards, $iva -- You received this message because you are subscribed to the G

Re: [algogeeks] C aps ques

2010-12-14 Thread vamsi achyuth
the evalution will be done from right to left in printf statement..so ++x will be evaluted and then x++.may be the out put is 6 and 6 i think On 13 December 2010 22:39, siva viknesh wrote: > #include > int main() > { > int x = 5; > printf("%d %d", x++, ++x); > > return 0; > > } >

[algogeeks] C aps ques

2010-12-13 Thread siva viknesh
#include int main() { int x = 5; printf("%d %d", x++, ++x); return 0; } for this output is "6 7" ... how evaluation proceeds?? -- Regards, $iva -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algo