@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 <[email protected]> wrote:
>
> "monsters are monsters"
>
>
>
> ---------- Forwarded message ----------
> From: raj kumar <[email protected]>
> Date: Sat, Aug 27, 2011 at 10:30 PM
> Subject: Re: [algogeeks] Re: String passing
> To: [email protected]
>
>
> 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 [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.
>
--
**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 [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.