User Tools

Site Tools


haas:spring2015:cprog:projects:cci0

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
haas:spring2015:cprog:projects:cci0 [2015/01/20 12:25] – created wedgehaas:spring2015:cprog:projects:cci0 [2015/01/20 12:50] (current) wedge
Line 39: Line 39:
  
 ====Mailing List==== ====Mailing List====
-Using the resources found on the course homepage (or the lab46 website in general), locate and subscribe a preferred and frequently checked e-mail address to the class mailing list (known as **DATA**).+Using the resources found on the course homepage (or the lab46 website in general), locate and subscribe a preferred and frequently checked e-mail address to the class mailing list (known as **CPROG**).
  
 We will use this for class discussions (along with irc, the notes wiki page, your Opus, etc.) and to disseminate announcements and other information. We will use this for class discussions (along with irc, the notes wiki page, your Opus, etc.) and to disseminate announcements and other information.
Line 71: Line 71:
 As a first week exercise, I would like you to implement, successfully compile, and verify correct execution of the best first program every great programmer writes: **Hello World** As a first week exercise, I would like you to implement, successfully compile, and verify correct execution of the best first program every great programmer writes: **Hello World**
  
 +Code will be as follows:
 +
 +<code c 1>
 +/*
 + * hello.c - the first best C program ever
 + *
 + * written by: your name
 + */
 +#include <stdio.h>
 +
 +int main()                              // every program needs a start, main() is ours
 +{
 +    fprintf(stdout, "Hello, World!\n"); // display a message to STDOUT
 +    return (0);                         // return a success status to OS
 +}
 +</code>
 +
 +Your task will be to transcribe this code (sans line numbers), into a source file (call it **hello.c** for simplicity), within some subdirectory of your lab46 account (**~/src/cprog/** may be a good choice).
 +
 +Verify you typed in everything correctly by compiling it; you want no warnings or errors:
 +
 +<cli>
 +lab46:~/src/cprog$ gcc -o hello hello.c
 +lab46:~/src/cprog$ 
 +</cli>
 +
 +Get to know/ask questions about that **gcc** line... this will not be the only time you see it.
 +
 +Finally, verify the program runs as anticipated:
 +
 +<cli>
 +lab46:~/src/cprog$ ./hello
 +Hello, World!
 +lab46:~/src/cprog$ 
 +</cli>
 +
 +Once satisfied, be sure to submit the program as indicated below.
 =====Submission Criteria===== =====Submission Criteria=====
 To be successful in this project, the following criteria must be met: To be successful in this project, the following criteria must be met:
Line 95: Line 132:
  
 <cli> <cli>
-lab46:~/src/cprog/dsi0$ submit cprog cci0 hello.c +lab46:~/src/cprog/cci0$ submit cprog cci0 hello.c 
-Submitting data project "cci0":+Submitting cprog project "cci0":
     -> hello.c(OK)      -> hello.c(OK) 
  
haas/spring2015/cprog/projects/cci0.1421756751.txt.gz · Last modified: 2015/01/20 12:25 by wedge