cse220-s09-p04-rubric

cse220-s09-p04-rubric - CSE220 Programming for Computer...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE220 Programming for Computer Engineering Lab Project 4: 16 Points Assignment Instructions You may work in pairs with a partner on this assignment if you wish or you may work alone . If you work with a partner, only hand in one assignment with both of your names on it; you will each earn the same number of points. This assign- ment is due at 4:00am on Sun 8 March. You are to use GNU-Linux and the GCC C compiler ( gcc ) to complete these exercises. You may use any text editor you wish to edit the source code files, e.g., VI, Kate, Kedit, Gedit, etc. When you are done, create a directory named cse220- p04 and four subdirectories within this directory named ex01 , ex02 , ex03 , and ex04 , one for each exercise. Put your .c source code file(s) for each exercise in the appropriately-named subdirectory. Do not put any other files in these subdirect- ories. Then, create a tarball of this cse220-p04 directory using the commands, $ tar cvf cse220-p04 -lname-fname.tar cse220-p04 assumes cse220-p04 is a subdir of your current dir $ bzip2 cse220-p04 -lname -fname.tar where lname is your last name, and fname is your first name. Upload the tarball to Moodle by the assignment submission deadline. I configure Moodle to disable the assignment submission link at 4:00am on the due date. If you do not submit your tarball by that time, the assignment will be considered late. Consult the online syllabus for the late and academic in- tegrity policies. Assignment Objectives 1. Write and compile complete C programs. 2. Use scanf() and printf I/O functions. 3. Use C if statements, loops, assignment statements, operators, variable definition statements, and return statements. 4. Define and manipulate C-style string arrays. 5. Write C functions, pass parameters, return values. C Programming Exercises 1. (3 pts) I/O in C is performed using the functions from the C Standard Library that are declared in the header file stdi- o.h . To use these functions, your C program must have a #include <stdio.h> statement near the top of the source code file. We will discuss the standard I/O functions in more detail later in the lectures, but for now I want you to know how to send integers, doubles, and strings to the stdout stream, and to be able to read integers, doubles, and strings from the stdin stream. To read a value from the keyboard (or stdin), use the scanf() function which has the prototype int scanf(char *, . ..); which states that scanf() returns an int, and it has one or more parameters. The first parameter is required and is a format string (we will discuss the syntax char * in more detail in the lectures but for now read this as "string"). What follows the first string parameter is a list of the variables in which the values that are read from the keyboard will be stored. To send a value to the console (or stdout), use the
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/02/2010 for the course COMPUTER cse 220 taught by Professor Kevinburger during the Spring '10 term at ASU.

Page1 / 5

cse220-s09-p04-rubric - CSE220 Programming for Computer...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online