ECE 209 Checklist (51 items)

Last updated: almost 11 years ago

To Do (41 left)

  • Explain the difference between local and global variables.
  • Explain the difference between a C statement and a C expression.
  • Evaluate C expressions – given a C expression, tell the value that is the result of evaluating that expression. (You must understand the meaning of each operator, and understand operator precedence, to do this correctly.) The expressions may contain ari
  • Execute a C statement – given a C statement, tell what actions are performed as a result of executing that statement. Statements may include expression statements, compound statements, if statements, if-else statements, while loops, do-while loops, and
  • Write a C expression that computes a specified value. (Example: Write a C expression that evaluates to the sum of integer variables x and y.)
  • Write a C statement that performs a specified action. (Example: Write a C statement that changes the value of variable x to be the minimum of variable y and the value 100.)
  • Write C code that declares, defines, and and/or calls functions.
  • Write a C program or function definition, using loops, conditionals, and function calls, that performs a given task (expressed as English, or pseudocode, or a flow chart)
  • Analyze a C program or function, and describe what actions it performs.
  • . Demonstrate proper use of printf and scanf functions. Demonstrate the use of the following format codes: %d, %c, and %x.
  • Show the contents of the symbol table used by the C compiler, and describe its use during compilation.
  • Describe the roles of LC-3 registers R4 and R5 in accessing variables in C programs.
  • List the fundamental data types provided in the C language, and list the size of each data type when implemented on the LC-3.
  • . Given a segment of C code, show the symbol table and/or LC-3 assembly language code generated by the compiler. (The code may contain any of the operators and statements listed in items 3 and 4 above.)
  • Describe the format of an activation record for the LC-3. Show the contents of the activation record during the execution of a particular function.
  • Describe how the run-time stack is used during the execution of a C program.
  • Define the following: return value, return address, dynamic link
  • . Generate the LC-3 assembly language code that corresponds to a function call (i.e., code required by the calling function).
  • Generate the LC-3 assembly language code that corresponds to a function definition (i.e., code required for the called function).
  • Evaluate C expressions that contain array references
  • Generate LC-3 assembly language code that corresponds to C code using arrays.
  • Evaluate C expressions that contain array references ([]), pointer dereferences (*), and address-of operators (&).
  • Generate LC-3 assembly language code that corresponds to C code using pointers and arrays.
  • Write C code that uses either array notation or pointer notation to process an array. Be able to translate from one notation to the other.
  • . Write C code that uses functions, pointers, and arrays. This includes: passing an array to a function, using the const modifier to prevent an array argument from being modified, passing a pointer to a function, using a pointer parameter to “return” mu
  • Write C code that declares and performs operations on string data. This may include implementing one of the standard string library functions (e.g., strcpy) without relying on any of the other string library functions.
  • Write C code that safely reads string data from standard input, and prints string data to standard output.
  • Write C code that uses the string.h library functions. You are only responsible for the following functions: strlen, strcpy, strcmp, strcat.
  • Given a description of the data you need, declare a struct type that represents that data.
  • Write C code that uses structs and/or struct pointers. (This includes references to struct fields using the . and -> operators, assignment of one struct to another, function calls using structs and struct pointers.)
  • Write C code that uses an array of structs.
  • Write C code that reads specified types of data from standard input.
  • Given a statement that includes a scanf call, and given a stream of characters on the standard input stream, describe what happens. (E.g., what values are stored, what is the return value?)
  • . Write C code that opens a text file for reading or writing. Describe what happens if the code tries to open a file that does not exist. Include code that handles errors when trying to open a file.
  • Write C code that reads data from specified I/O stream (e.g., one that results from opening a file) and prints data to a specified stream. Include cases in which the stream has reached the end of its data (e.g, the end of a file).
  • Write C code that closes an I/O stream when it is no longer needed.
  • Write C macros, with and without arguments
  • . Write C code that uses macros.
  • Translate C code that uses macros into LC-3 assembly language.
  • . Demonstrate understanding of macro processing by the C compiler. (E.g., macros are not variables, macros are not functions, etc.)
  • Use either of the following sorting algorithms to sort elements of an array. (I do not expect you to memorize code, but you should understand the algorithm well enough to know how it works, and to generate code for it yourself, possibly with some variat
  • Use typedef and macros to adapt an existing sorting algorithm to a different type of data. Types of data include integers, floating-point numbers, strings, structs, etc
  • Use the quicksort algorithm to sort elements of an array. (I do not expect you to memorize code, but you should understand the algorithm well enough to know how it works, and to generate code for it yourself, possibly with some variations.) Note that th
  • Use a C struct to create and/or manipulate a singly-linked list (in which each node has a pointer to the next node in the list). Examples of manipulation include, but are not limited to: • add item to list • remove item from list • change the order of
  • Demonstrate the proper use of the malloc() and free() library functions.
  • Write C code to create and use a dynamically-allocated array.
  • Use linked lists in conjunction with other data structures – e.g., an array of linked lists, a list of arrays, a struct that contains a list as a field, a list of lists, etc.
  • Use the interface of an ADT in C code -- i.e., write some client code using a specified ADT
  • Write the implementation of an ADT interface -- i.e., write a provider for an ADT
  • Demonstrate how an ADT interface decouples the client code from the implementation, by implementing the same interface in different ways. (The interface stays the same, but the implementation changes. Example: using polar vs. Cartesian coordinates for a
  • Identify three kinds of kinds of for-loops: (1) can be parallelized with OpenMP parallel for, (2) can be parallelized with OpenMP parallel for with reduction, (3) cannot be parallelized using OpenMP. You will not be expected to re-write a loop to make i