CPSC-1010 Lecture Notes - Lecture 4: Data Segment, Floating Point, Scientific Notation
Document Summary
Comments: /* this multi-line comment might typically set off a larger, block of code, and explain the function of the block *, // or you might just have a one-line comment like this. Put as a line by itself or in a line of code. Rounds down to and displays 6 decimal places: double. Rounds up to and displays 6 decimal places. Memory: if x and y are declared as int variables, they are two chunks of memory labeled as the names of the variables. Memory is serial, composed of four-byte words. The system keeps track of the type and address associated with each variable. Data segment global and static variables. Stack segment activation records and dynamically allocated memory. Only the function on top of the stack is actively executing: when printf completes, the associated activation record is popped off the stack and we are back to executing in main: