this code produces DANGLING REFERENCES coz buffer points to a location that
does not exist ....\after execution of return statement...

On Tue, Jan 6, 2009 at 2:48 AM, tania hamid <tan3...@gmail.com> wrote:

>
>
> Plz indicate the output of the following code and explain why is it so..
>
>
> *char *modify (char *s)
> {
> #define MAX 15
>   char buffer[MAX];
>   strcpy (buffer, s);
>
>   buffer[0] = 'H';
>   return buffer;
> }
>
> int
> main ()
> {
>   printf ("hello!!!");
>   printf ("%s ", modify ("hello!!!"));
> }*
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to