01:198:111 Lecture Notes - Lecture 10: Call Stack, Programming Paradigm
214 views2 pages
Verified Note
9 Oct 2018
School
Department
Course
Professor
01:198:111 verified notes
10/28View all
Document Summary
An example is the divide and conquer where you divide the problem into smaller. Functions are all grouped in a class. What the main function does is that it calls upon other functions within the same. Main function in the file is often to just test the other functions within the file file. A runtime stacks works like a stack in the conventional sense with stack frames to hold variables. The first thing a program does is to look at the variables declared and put them in order. These declared variables are the variables related to the main program. When the main function calls for another function, another stack frame is formed with its own variables from the second function and stacks it on top of the first stack frame. When you do use another function, a return command is needed to return back to the main function.