Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS201 - Information. CS201 - Laboratories All labs will be done using Linux on the PC’s or esus. All labs MUST use Makefiles. First lab is due NEXT WEEK.

Similar presentations


Presentation on theme: "CS201 - Information. CS201 - Laboratories All labs will be done using Linux on the PC’s or esus. All labs MUST use Makefiles. First lab is due NEXT WEEK."— Presentation transcript:

1 CS201 - Information

2 CS201 - Laboratories All labs will be done using Linux on the PC’s or esus. All labs MUST use Makefiles. First lab is due NEXT WEEK at the end of your respective lab period. You will need to learn a Linux based text editor, such as pico, vim, or emacs.

3 CS201 – Help Sessions With a few exceptions (e.g. 2/18), there will be a help session on Fridays in ROBH101 at 3:10 p.m. This session will cover auxiliary material related to lecture and labs. For example, the first help session (1/14) will be on Linux, using a text editor, and compiling and running C programs

4 CS201 - Suggestions Do the reading assignments BEFORE coming to lecture. Take advantage of the exercises and self-tests in the text. Review the lab assignments, design your solution, and do some preliminary coding BEFORE your lab period.

5 CS201 – esus accounts You will need to have an esus account to login to Linux on the machines in EPS254. Wait until you get your esus account to do lab #1. (No late penalties on this lab only).

6 CS201 - Enrichment These are things that are not on the direct path of CS201 material but would be useful and interesting to advanced students. No exam questions will be directly on enrichment topics. C puzzles, additional lab procedures, or C++ related topics.

7 CS201 – Lab #1 – (1/18-1/19) Boot the machine into Linux. Login to the machine. Use a text editor to build the “hello world” program. Use a text editor to build a simple Makefile for the “hello world” program. Using the Makefile, compile your program and run it. Print out the Makefile and your source code file.

8 “hello world” C program /* helloworld.c * CS201 – S’05 – by (your name here) */ #include int main(void) { printf(“Hello World!\n”); exit(0); }

9 helloworld Makefile # Makefile for helloworld # CS201 – S’05 by (your name here) helloworld: helloworld.o gcc –o helloworld helloworld.o helloworld.o: helloworld.c gcc –c helloworld.c

10 CS201 – sample make $ make gcc –c helloworld.c gcc –o helloworld helloworld.o $

11 CS201 – Sample run $ helloworld Hello World! $

12 CS201 – lab #1 enrichment Try changing the helloworld program so it says “Happy New Year!” instead of “Hello World!”. Try printing a line of astericks *************** before and after the “Happy New Year” message. If you wanted to use the C++ compiler instead, replace gcc with g++.


Download ppt "CS201 - Information. CS201 - Laboratories All labs will be done using Linux on the PC’s or esus. All labs MUST use Makefiles. First lab is due NEXT WEEK."

Similar presentations


Ads by Google