0
What's the difference between passing a struct pointer and declaring it inside the function itself?
I am making a queue using linked list without using global variables.
1 Antwort
+ 1
If you declare it inside the function then you can not use it outside that function or inside another function.
Passing struct pointer means you are passing that struct into the function from.outside the function than you can perform any operation on it that will also affect the original stuct object outside the function