ECS 30 Lecture Notes - Lecture 5: C Standard Library, C Mathematical Functions, Call Stack
Document Summary
Scanf() can return the amount of positive associations and this can be used as a measure of success. Functions parameters are received in the same order as the arguments were given. The body of the function can also use control structures. Scanf() will return the number of input tokens it was able to match, and its useful to impose certain format in a format string. Variables can be defined with the same name, but they have to within different block scopes. The compiler will search the block for the symbol and then parent blocks. There is a space in memory called a stack, which is where the local variables are placed. They are stacked in the order that they are declared in the program. Once the block with local variables is left, the defined variables are removed from the stack.