COMP 2401 Study Guide - Final Guide: Compile Time, Child Process, Gnu Compiler Collection
Document Summary
For negative numbers invert the numbers, then add 1. (e. g, Function call stack = contains local variables and function parameters; stores your methods and executes them in a push/pop manner. Heap = chunk of memory for dynamic memory allocation. Contain data(variables, structures,etc), and a pointer to the next node. Linked list example- classlist = (struct student *) malloc(sizeof(struct student)); strcpy(classlist->name, >major, cs );currnode = classlist; currnode->next = (struct student *) malloc(sizeof(struct student)); currnode = currnode- To traverse, make it while currentnode != null, make the current node the currentnode->next. To delete a node, make the prev->next == null, and don"t forget to free(deletednode) Program building: makefiles- create a . txt file called "makefile", call the command make to use it to link your program components together test: test. o mydiv. ogcc -o test test. o mydiv. o test. o: test. c gcc -c test. c mydiv. o: mydiv. c gcc -c mydiv. c. Pre-processing directives: start with the # symbol; examples include #define, #incude, and.