Introduction
Hello my name is Zack Golden, I am in the computer information program. Got one class left being, data structures. I'm a big gamer and also enjoy messing around with computers. Also a big sports guy mainly with football and basketball.
8/25/2015
8/27/2015
struct node//name of struct "node"
{
signed short int value;//holds the value of the node
struct node *next;//points to the next node
};
typedef struct node Node;//allows you to use Node rather then typing out struct node every time
Node *tmp = NULL;//creates first node using typedef
struct node *tmp2 = NULL;//creates 2nd node using struct
tmp = (Node*)malloc(sizeof(Node));//gets memory for the first node
tmp->next=NULL;//set the next pointer of the node struct to null
tmp->next=(Node*)malloc(sizeof(Node));//creates 2nd node
tmp->next->next= NULL;//sets 2nd node next to NULL
tmp2 = tmp->next;//tmp2 is the node after tmp
tmp->value= 7;// sets first node value to 7
tmp2->value= 13;//sets 2nd node value to 13
9/1/2015
9/3/2015
Node functions
List function
create
copy
clear
insert
append
obtain
setpos
struct list{
struct list *start;//pointer that is positioned to the start of the list
struct *end;//pointer that is positioned at the end of the list
int qty;//shows the quantity of nodes in a list
};
9/8/2015
9/10/2015
Compile
gcc filename.c -o filename
gcc -o filename filename.c
gcc -o filename filename.c -g
gdb ./filename to run file after compile using the debugger
Debugger tools
backtrace: allows you to see previous steps that got you to where you are
list “line”: shows the line you specified and some above and bellow
break point: tell debugger to stop at that point and stop running
print: prints out the value of variable you pass
step: runs one line then stops but follow functions
next: same as step but skips over functions
continue: goes until next breakpoint
display: set variable displays to show values every time something display
watch: stops execution of your program whenever the value of an expression changes
set var: set variable to a specified value
9/15/2015
9/17/2015
Run a test in sln1 or bin
Use make to compile but from sln1 directory
Verify test: is just for a pass or fail
Unit Test: shows the answer and what you have
Make check: runs all verify tests to see how much tests you pass or fail
sln1:
mknode, conode, rmnode
node-app-arrtolist
node-app-display
node-app-display2
9/22/2015
9/24/2015
9/29/2015
Status data: used to see grades and progress
Status data detail: goes into further details on grades and projects
Reviewed sln1 to see possible improvements
s110 due Wednesday by midnight
10/1/2015
10/6/2015
10/8/2015