I have a code:
struct point makepoint(int x, int y)
{
struct point temp;
temp.x = x;
temp.y = y;
return temp;
}
We have a problem here, because we are returning a local structure, isn’t it destroyed after the completion of the makepoint function ? This code is from the book.
C Programming Language (Second Edition) by Brian W. Kernigan • Dennis M. Ritchie
.
user5585984
source
share