i thing that if u negate any value by ! the result will be always a int.. so !a will be a integer value and !a+b due to typecast will be also int.. you can verified this fact by seeing the result of
sizeof (!a+a) => 12 sizeof (!b) =>4 sizeof (!a) =>4 sizeof(!(a+b)) =>4 sizeof (!(!a)) =>4 *- - - - - WITH REGARDS, * * PRAMENDRA RATHI * ** *B.TECH 2ND YEAR* *COMPUTER SCIENCE AND ENGINEERING* *NIT ALLAHABAD* On Thu, Jun 23, 2011 at 5:52 PM, Anika Jain <anika.jai...@gmail.com> wrote: > int main() > { > long double a; > signed char b; > printf("%d\n",sizeof(!a+b)); > return 0; > } > > why is it 4?? shouldnt it be 12 as per sizeof long double in gccc > > -- > 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. > -- 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.