Than y r we able to do the following
main()
{
char *p="hello";
p="bye";
}On Thu, Apr 21, 2011 at 4:21 PM, Sudhir mishra <[email protected]>wrote: > yes there is error; > first allocate memory for p; > > > On Thu, Apr 21, 2011 at 6:44 AM, riti gupta <[email protected]> wrote: > >> is there any error in following code? >> >> main >> { >> char *p="hello"; >> p[0]='j'; >> p[1]='j'; >> puts(p); >> } >> >> -- >> 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. >> > > > > -- > > [image: motilal.JPG] > Thanks & Regards...* > SUDHIR MISHRA <[email protected]>* > *IT 3rd YEAR* > *Motilal Nehru National institute Of Technology-ALLAHABAD. > * > > -- > 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.
<<motilal.JPG>>
