Join 75,000+ students acing their exams with Studygenie
Unlimited practice
Flashcards, multiple choice and written questions, as many as you want.
Study sets in seconds
Turn your notes and files into a set with AI.
See your progress
Always know what you've learned and what's left.
Questions in this set (5)
What are functions?
the same as static methods in Java
What's the difference between functions and methods from Java?
a function requires it to be forward declared (meaning its signature must be defined before its implementation) or a prototype before implemented.
What happens when function returns an array in C?
returns error, because an array is not an actual value but an address
What's a type pointer and how do they solve the issue with returning array?
pointer variable type holds an address not a value. We can have our function return the address of local array
What happens when you call a function?
new frame is added to the stack memory with enough size for all the variables inside the function. Once function is done, it is then popped off the stack