V
Vols
void f (char *a)
{
a++;
}
int main (void)
{
char a[] = "abc";// or char *a = "abc";
f (a);
puts (a);
return 0;
}
Looks it is 'pass by address'. The result is 'abc' instead of 'bc'. So
actually it is 'pass by value'.
What happened? thanks.
Vol
{
a++;
}
int main (void)
{
char a[] = "abc";// or char *a = "abc";
f (a);
puts (a);
return 0;
}
Looks it is 'pass by address'. The result is 'abc' instead of 'bc'. So
actually it is 'pass by value'.
What happened? thanks.
Vol