Chapter 5 in brief


Function: A function is a name associated with a chunk of code.
Argument: Values passed to a function are known as Arguments.
What is the difference between Declaring & Defining a function? Declaring a function just warns the compiler that a function with a particular name is coming. Defining the function is where we describe the steps that should be executed.
Note1: sleep() function
Standard libraries: The standard libraries serve two function: 1- The represent big chunk of code that you don’t need to write & maintain. 2- They ensure that most programs look & feel similar.
Local Variables: Local Variables are variables declared inside a function. They exist only during the execution of that function and can only be accessed from within that function.
Parameters: A parameter is a local variable that has been initialized to the value of the corresponding argument.
Frame: A function can have many local variables, and all of them are stored in the frame for that variable.
Stack: Each function has its own frame and all of these frames are stored in the stack.
Note2: Stack is always last in-first out.
Breakpoint: A breakpoint is a location in code where you want the debugger to pause the execution of your program.
Note3: stack trace
What is the difference between returning 0 & 1 to a function? When you return 0 to the system, you are saying everything went ok. If you are terminating the program because something has gone wrong, you’ll return 1. You can also use EXIT_SUCCESS & EXIT_FAILUR rather than 0 and 1 from stdlib.h.
Global Variables: Variables that can be accessed & touched from any function at any time, are Global Variables.
Static Variables: Exist outside of any function benefit while avoiding you touched my variable my issue.