for further details..... http://en.wikipedia.org/wiki/Comma_operator
On 6/23/11, Piyush Sinha <ecstasy.piy...@gmail.com> wrote: > the comma operator evaluates its first operand and discards the > result, and then evaluates the second operand and returns this value. > instead of 3, whatever u write. the result will depend on the second > operand i.e x>>1 i.e 2 (5/2 = 2) > > On 6/23/11, Anika Jain <anika.jai...@gmail.com> wrote: >> #include<stdio.h> >> typedef struct >> { >> char *name; >> double salary; >> }job; >> >> main() >> { >> static job a={"tcs",15000.0}; >> static job a={"ibm",25000.0}; >> static job a={"google",35000.0}; >> int x=5; >> job *arr[3]={&a,&b,&c}; >> printf("%s %f\t",(3,x>>1)[*arr]); >> } >> >> output: google 35000.000000 >> >> what this printf statement means plz explain... >> >> -- >> 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 from this group, send email to >> algogeeks+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> >> > > > -- > *Piyush Sinha* > *IIIT, Allahabad* > *+91-8792136657* > *+91-7483122727* > *https://www.facebook.com/profile.php?id=100000655377926 * > -- *Piyush Sinha* *IIIT, Allahabad* *+91-8792136657* *+91-7483122727* *https://www.facebook.com/profile.php?id=100000655377926 * -- 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 from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.