Declare the character strings char five[7]; char four[7]; int three; char two[7]; char one[7];
int his order and we get the correct output. But i dont know y?Its something to do with Memory location where the strings are defined. *Muthuraj R. 4TH Year BE.** Information Science Dept* *PESIT, Bengaluru . * On Sat, Jul 23, 2011 at 10:57 PM, shady <sinv...@gmail.com> wrote: > anyone ? > > > On Sun, Jul 24, 2011 at 2:38 AM, Anika Jain <anika.jai...@gmail.com>wrote: > >> in this in scanf one,two, four five will b thr, no & thr.. >> >> and sumbody plz tell afterwards this change why the o/p is >> this is 10 times charlie >> thisis10charlie >> >> why in 'four' empty string is going?? >> >> >> On Sat, Jul 23, 2011 at 9:37 PM, geek forgeek <geekhori...@gmail.com>wrote: >> >>> #include<stdio.h> >>> main() >>> { >>> char outline[50]; >>> char one[7],two[7],four[7],five[7]; >>> int three; >>> sprintf(outline,"this is %d times %s \n",10,"charlie"); >>> printf("%s",outline); >>> sscanf(outline,"%s %s %d %s %s",&one,&two,&three,&four,&five); >>> printf("%s",one); >>> printf("%s",two); >>> printf("%d",three); >>> printf("%s",four); >>> printf("%s",five); >>> } >>> >>> -- >>> 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. >> > > -- > 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.