Thinking in C and *nix (CSC 295/282 2014S) : EBoards
Primary: [Front Door] [Schedule] - [Academic Honesty] [Disabilities] [Email] [FAQ] [Teaching & Learning] - [Calendar]
Current: [Outline] [EBoard] [Reading] [Lab] [Assignment]
Sections: [Assignments] [EBoards] [Examples] [Handouts] [Labs] [Outlines]
Reference: [EBook] - [ISO] [GNU Coding Standards] [GCC Documentation] - [TAoUP] [Make3]
Related Courses: [CSC 295 2013S]
Misc: [SamR] [Glimmer Labs] [CS@Grinnell] [Grinnell] [Issue Tracker]
Overview
&, |, etc.)the error?)
int *x; // Our array of data.
int
main (int argc, char *argv[])
{
x = malloc (...);
foo ();
bar ();
free (x); // Crash
} // main
Note: "You went beyond the null at the end of the array."
char *str = malloc (sizeof (char) * 16); strcpy (str, "hello"); printf ("%d\n", strlen (str));
man -k spell
uniq - not quitegrep -i -o '<img[^>]*src=[^>]*>' input | grep -o '"[^"]*"'
The first part gets you lines that look like
The second part extracts the stuff in quotation marks
Flaws in this solution?
"I want the names of the people with the five highest grades on HW2." File has
fname:lname:assignment:grade
sed -e 's/ *$//'
Write it in C. You have ten minutes.
While input characters remain read the next input character switch (ch) case space: shove it in the buffer break; case newline: clear the buffer break; default: print the buffer clear the buffer print ch; break
Learn Markdown so that we can use it for these assignments.
Learn about how you set and get environment variables. Put your
explanations in the submissions directory, with a file named after
you.
Update our list of "things every *nix user should know" (either in the repo
Come up with two or three tasks, similar to those we did for assignment 1, and put notes about them in the tasks directory. (You can include some sample solutions in your file.)
Read the first chapter of the Make book.
Primary: [Front Door] [Schedule] - [Academic Honesty] [Disabilities] [Email] [FAQ] [Teaching & Learning] - [Calendar]
Current: [Outline] [EBoard] [Reading] [Lab] [Assignment]
Sections: [Assignments] [EBoards] [Examples] [Handouts] [Labs] [Outlines]
Reference: [EBook] - [ISO] [GNU Coding Standards] [GCC Documentation] - [TAoUP] [Make3]
Related Courses: [CSC 295 2013S]
Misc: [SamR] [Glimmer Labs] [CS@Grinnell] [Grinnell] [Issue Tracker]
Copyright (c) 2013 Samuel A. Rebelsky.

This work is licensed under a Creative Commons Attribution 3.0 Unported License. To view a copy of this
license, visit http://creativecommons.org/licenses/by/3.0/
or send a letter to Creative Commons, 543 Howard Street, 5th Floor,
San Francisco, California, 94105, USA.