For example,
Func (a, b, c)
{
c=a+b;
}
The main ()
{
Int I=1, j=2 and k=0;
Func (I, j, k);
Printf (" k=% d \ n ", k);
}
K value is invalid as a result, in the other process calls the function is normal, the aunt, discuss under what circumstances can lead to this situation?
CodePudding user response:
Fill section C language function, parameter will not change the argument, the return value, if want to use parameters using a pointer,Func (int a, b int, int * c)
{
* c=a + b;
}
CodePudding user response:
This is my a slip of the pen, is the original pointer type, strange calls are no problem in other processesCodePudding user response: