lab1 - CS240 Lab1 Basic I/O and Implementing an RPN...

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

View Full Document Right Arrow Icon
CS240 Lab1: Basic I/O and Implementing an RPN Calculator Goal: In this lab you will write programs that use basic I/O as well as implementing a command line RPN calculator. Topics covered Functions, global variables, for, while, if, local variables, getchar(), basic printf, basic string manipulation, arrays, strcmp, sin, cos, pow, exp, passing arguments to main, atof to the MAiling List 1. Downloading the Initial Files You will be doing this lab in Remote login to and create a directory cs240 cd ~ mkdir cs240 Download the files in lab1-src.tar.gz in this directory and type gunzip lab1-src.tar.gz tar -xvf lab1-src.tar lab1-src will include the initial files that you will need as well as the test files. Change to this directory and type cat hello.c gcc -o hello hello.c ./hello You should receive the greeting "Hello world!". 2. Remote login to lore If you are already running in a UNIX machine, like a workstatrion in the lab, you can run the command "ssh <login>@ However, if you are working on a windows machine, you can download a ssh client program such as putty . In the terminal window you can compile, run make or run the tests. Most of the programs that will be created in this course will be command line based.
Background image of page 1

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

View Full DocumentRight Arrow Icon
To transfer files back and for from your machine you can use scp , or in windows you can install winscp , or filezilla that are windows based sftp clients. Alternatively, you may decide to install cygwin , that is a UNIX like environment in your PC that has ssh, sftp and other UNIX commands. If you decide to install it, remember to select to install the development, net, and editor modules. 3. Editing/Running/Debugging your C programs Inside the login terminal you can run pico , vi , or other terminal editors. I recommend to use pico since it is simple to use and it is also powerful. Type pico in the terminal screen and it will show the editiing window and all the options you have. It is better to
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/18/2012 for the course CS 240 taught by Professor Rego during the Fall '08 term at Purdue.

Page1 / 6

lab1 - CS240 Lab1 Basic I/O and Implementing an RPN...

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

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