ya i got it.. thanx On Thu, Jun 23, 2011 at 6:01 PM, rajeev bharshetty <[email protected]>wrote:
> It is because of the ! operator in front of a , !a is always 0(in case a is > value other than 0) so it takes it as integer and hence the size is 4 bytes > whereas only a you will get 12 . The ! changes the data type here . > Hope it clears the doubt :) > > > ----------------------------------------- > > > Rajeev N B > > I Blog @ www.opensourcemania.co.cc > > On Thu, Jun 23, 2011 at 5:52 PM, Anika Jain <[email protected]>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 [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> 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 [email protected]. > To unsubscribe from this group, send email to > [email protected]. > 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
