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.

10th Oct 2020, 5:39 PM
Raj Priyadarshi
Raj Priyadarshi - avatar
1 Resposta
+ 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
19th Apr 2021, 5:10 PM
KUMAR SHANU
KUMAR SHANU - avatar