CSC 230: C and Software Tools Rudra Dutta Computer Science Department Course Introduction.
-
Upload
christian-sutton -
Category
Documents
-
view
212 -
download
0
Transcript of CSC 230: C and Software Tools Rudra Dutta Computer Science Department Course Introduction.
CSC 230: C and Software ToolsCSC 230: C and Software Tools
Rudra Dutta
Computer Science Department
Course Introduction
General DescriptionGeneral Description
Learn procedural programming in C Stages of program compilation and execution Memory allocation and de-allocation Gain perspective in programming
methodologies Program in “chunks” - recognize successively
higher levels of organization Work from the command line with simple tools Overarching gain from course - conceptual
Instructional ObjectivesInstructional Objectives Upon successful completion of this course, a student will be
able to...– write small to medium C programs having several separately-
compiled modules.– explain what happens to a program during preprocessing, lexical
analysis, parsing, code generation, code optimization, linking, and execution, and identify errors that occur during each phase. In particular, they will be able to describe the differences in this process between C and Java.
– correctly interpret error messages and warnings from the preprocessor, compiler, and linker, and avoid them.
– find and eliminate runtime errors using a combination of logic, language understanding, trace printout, and gdb or a similar command-line debugger.
– allocate and deallocate memory in C programs while avoiding memory leaks and dangling pointers. In particular, they will be able to implement dynamic arrays and singly-linked lists using allocated memory.
Instructional Objectives (contd.)Instructional Objectives (contd.)
– use the C preprocessor to control tracing of programs, compilation for different systems, and write simple macros.
– write, debug, and modify programs using library utilities, including, but not limited to assert, the math library, the string library, random number generation, standard I/O, and file I/O.
– use simple command-line tools to design, document, debug, and maintain their programs.
– use an automatic packaging tool, such as make or ant, to distribute and maintain software that has multiple compilation units.
– use a version control tool, such as cvs, to track changes and do parallel development of software.
– distinguish key elements of the syntax (what’s legal), semantics (what does it do), and pragmatics (how is it used) of a programming language.
Class ParticipationClass Participation
Focus of lectures - concepts– Syntax and lexical correctness hardly need lectures
Concepts can be odd– Different ones are difficult to different people– Repetition helps– Talking it out helps
Some active group exercises may be undertaken as class work
Recurring ThemesRecurring Themes
Getting closer to the machine
Dealing with memory
(Why C?)
ResourcesResources
Text Class lecture and notes you take
– Course website
Teaching assistants Instructor Web repositories, other texts, …
Some Specific FeedbackSome Specific Feedback
Programming experience / background– Reqd. / not reqd. for you– Year (sophomore, junior, senior, …)– Total programming experience– Languages– Answer code snippet questions
Availability of programming platform in class
Why C? (Personal View)
Code SnippetsCode Snippets Re-write each of the following code snippets, in each case replacing a for statement
by a while statement, or vice-versa, but otherwise completely equivalent.
while (a < b) {a = a + 1;
}
for (counter = n; counter != 0; counter = counter - 1) {result = 2 * result;
}
while (current_value++ < new_num) {create_entry (current_value + i++);
}printf (“%d ¥t %d ¥n”, current_value, i);