Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
kjc015
CSCI206-S21-62
Commits
d6477533
Commit
d6477533
authored
Apr 24, 2021
by
kjc015
Browse files
Lab11, Exercise 1, Complete
parent
0bf49ce4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Labs/Lab11/answers.txt
0 → 100644
View file @
d6477533
Kyle Chrysler
Section 63
1. The -g flag generates debug information.
2. You can use break *line number* to make a breakpoint at a certain line.
3. You can use next to execute the next line of code after stopping at a breakpoint.
4. Step debugs the code inside of the function.
5. You can use continue or c to resume a program after stopping at a breakpoint.
6. To see the value of a variable, you can use print.
7. You can use info locals to see a list of all variables in the current function.
8. Backtrace prints a trace of how a program got to where it is.
Labs/Lab11/example.c
0 → 100644
View file @
d6477533
#include
<stdio.h>
#include
"list.h"
int
main
(
int
argc
,
char
*
argv
[]){
int
i
;
node
*
head
=
mk_node
(
1
);
for
(
i
=
0
;
i
<
8
;
i
++
)
{
ll_append
(
head
,
mk_node
(
i
+
10
));
}
ll_print
(
head
);
return
0
;
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment