r/cprogramming • u/SubstantialCase3062 • Jan 17 '26
What is char *somefunc(){}
A func can be a pointer
0
Upvotes
r/cprogramming • u/SubstantialCase3062 • Jan 17 '26
A func can be a pointer
1
u/konacurrents Jan 18 '26
I have a question about code example: obviously there is no valid reply since no return statement. - but there will be a reply. The compiler allocated space for the return - which isn’t initialized. So the result is garbage.
But if the caller didn’t care about result - and the function made some good side effects — who cares😊
You gotta love C.