@raj

u already mentioned that if we write :-
char *p="hello";
p[0]='k'; // gives runtime error


so if we are passing arguments as

modify(char a[],char *b)
{
.
.
}

main()
{
.
.
modify("hello","hi");
.
.
}


then its actually
char arr[]="hello";
char *b="hi";

so ofcourse now
b[0]='a'; // give u runtime error

now u may be confuse about
arr[0]='a'; //gives runtime error

here i would like to tell you that arr is char pointer not char array....
you can check by yourself in :-   http://www.ideone.com/EQrjj

On Sat, Aug 27, 2011 at 10:39 PM, raj kumar <megamonste...@gmail.com> wrote:

>
> "monsters are monsters"
>
>
>
> ---------- Forwarded message ----------
> From: raj kumar <megamonste...@gmail.com>
> Date: Sat, Aug 27, 2011 at 10:30 PM
> Subject: Re: [algogeeks] Re: String passing
> To: algogeeks@googlegroups.com
>
>
> can't understand what are you trying to say
>
> source
>
>  --
> 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.
>



-- 
**Regards
SAGAR PAREEK
COMPUTER SCIENCE AND ENGINEERING
NIT ALLAHABAD

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

Reply via email to