for this char *d = "abc\ldef\l"; the output is 4 8 not 4 9 \l treated as one character
On Wed, Aug 31, 2011 at 9:34 PM, aditi garg <aditi.garg.6...@gmail.com>wrote: > @dheeraj yea true,,,bt ut ws an array...its a pointer here...so output will > be 4 3... > infact it wud be 9 3 in the case u r considering > > > On Wed, Aug 31, 2011 at 9:32 PM, Dheeraj Sharma < > dheerajsharma1...@gmail.com> wrote: > >> 8 3 is correct..winshuttle mein aaya tha ;) >> >> >> On Wed, Aug 31, 2011 at 9:30 PM, aditi garg <aditi.garg.6...@gmail.com>wrote: >> >>> No sizeof ignores \0 >>> >>> >>> On Wed, Aug 31, 2011 at 9:27 PM, SANDEEP CHUGH >>> <sandeep.aa...@gmail.com>wrote: >>> >>>> its 4 3 i think >>>> >>>> >>>> On Wed, Aug 31, 2011 at 9:25 PM, aditi garg >>>> <aditi.garg.6...@gmail.com>wrote: >>>> >>>>> 8 3 >>>>> >>>>> >>>>> On Wed, Aug 31, 2011 at 9:22 PM, rohit <raman.u...@gmail.com> wrote: >>>>> >>>>>> output?? >>>>>> >>>>>> int main() >>>>>> { >>>>>> char *d = "abc\0def\0"; >>>>>> printf("%d %d",sizeof(d),strlen(d)); >>>>>> getch(); >>>>>> } >>>>>> >>>>>> -- >>>>>> 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/-/nf_M_Yoep_EJ. >>>>>> 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. >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Aditi Garg >>>>> Undergraduate Student >>>>> Electronics & Communication Divison >>>>> NETAJI SUBHAS INSTITUTE OF TECHNOLOGY >>>>> Sector 3, Dwarka >>>>> New Delhi >>>>> >>>>> >>>>> -- >>>>> 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. >>>> >>> >>> >>> >>> -- >>> Aditi Garg >>> Undergraduate Student >>> Electronics & Communication Divison >>> NETAJI SUBHAS INSTITUTE OF TECHNOLOGY >>> Sector 3, Dwarka >>> New Delhi >>> >>> >>> -- >>> 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. >>> >> >> >> >> -- >> *Dheeraj Sharma* >> Comp Engg. >> NIT Kurukshetra >> +91 8950264227 >> >> >> -- >> 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. >> > > > > -- > Aditi Garg > Undergraduate Student > Electronics & Communication Divison > NETAJI SUBHAS INSTITUTE OF TECHNOLOGY > Sector 3, Dwarka > New Delhi > > > -- > 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. > -- *Dheeraj Sharma* Comp Engg. NIT Kurukshetra +91 8950264227 -- 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.