In C, the type of a character constant like 'a' is actually an int, with size of 4. In C++, the type is char, with size of 1. This is one of many small differences between the two languages.
On Thu, Jun 23, 2011 at 6:50 PM, piyush kapoor <[email protected]> wrote: > You didn't understand my question... > Why is sizeof() interpreting a "constant character literal" as ascii??? > > > -- > *Regards,* > *Piyush Kapoor,* > *CSE-IT-BHU* > > -- > 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.
