Presentation is loading. Please wait.

Presentation is loading. Please wait.

Welcome to CSCI 230! Problem Solving using C

Similar presentations


Presentation on theme: "Welcome to CSCI 230! Problem Solving using C"— Presentation transcript:

1 Welcome to CSCI 230! Problem Solving using C
CSCI 230 Computing-I Welcome to CSCI 230! Problem Solving using C

2 General Information Your lab instructor… Your lab time…

3 Objectives for the Lab Learn problem solving strategies
Achieve intermediate knowledge of C Programming Language Gain experience leveraging basic data structures Get an understanding of simple algorithms

4 Agenda Environment setup Introduction to UNIX Login to Phoenix Email
UNIX files and directory structure Basic UNIX commands

5 Agenda How to use a text editor
vi editor -- basic commands Create and compiler your first C program! “Hello world” program Compile using “gcc” compiler Execute

6 Login to UNIX User Name Password
First letter of first name, followed by up to the first seven letters of your last name Password First letter of your first name, followed by the last 4 digits of your student id, followed by the first 3 letters of your last name E.g., if the name is John Smith and the student id is: then the user id and the password are: jsmith j9999smi

7 Login (Cont’d) UNIX is case-sensitive!
The username and the password are in lower-case If you are NOT able to logon then try: user name as: first letter of your first name, followed by the middle initial, followed by the last name (at the maximum of 6 characters) If John’s Smith’s middle name is Adams then his user name will be jasmith If nothing works, inform the instructor Once you login for the first time, the system will prompt you to change the password…create a new password and remember it

8 Introduction to UNIX UNIX is a multitasking operating system that manages the resources of a computer and provides a user interface. UNIX is case sensitive, which means, upper and lower case characters are treated as different characters. The UNIX machine for which you are given an account is: phoenix.cs.iupui.edu

9 The UNIX Directory Structure
A directory is a location to store information. UNIX starts with a root directory / /etc /home /usr /bin /jsmith /tjones /local

10 The UNIX Prompt login: jsmith Password:
Last login: Mon Aug :42:33 from gatekeep.usagrou Sun Microsystems Inc. SunOS Generic February 2000 phoenix{jsmith}1: Command number Machine name User name

11 Essential UNIX Commands
ls- list files in present working directory pwd- display present working directory cd- change directory cd Backup one directory level lp (or lpr) - print file to printer: Printer in SL251! rm- remove a file cp- copy a file mv- move or rename a file mkdir- make a directory rmdir- remove a directory

12 Email Pine is the e-mail editor on phoenix
is to communicate to the instructors and other classmates for questions and material related to CSCI230 Project updates and class notifications are distributed via Check your OFTEN!

13 Class E-mail Subscription
Subscribe to the class to receive mail sent to the entire class by instructors and other classmates Send mail to: Subject: blank Body of Message: subscribe cs230

14 Pine From the unix prompt type pine
The system will indicate the welcome message for the first time Type c to compose a mail Write in the To field Leave the Subject field blank Type subscribe cs230 below Message Text Type control x to send the mail Type q to quit

15 How to Use Vi phoenix{jsmith}1:vi filename :q! - Quit without saving
:wq – Quit and save :w – Save Line number{Shift}g – Goto line number {Shift}g – Goto end of file x - To delete the char at the cursor dd - Delete the entire line

16 How to Compile A Program
phoenix{jsmith}1: gcc program1.c C programs end in the “.c” extension The executable file is called a.out

17 How to Execute Your Program
phoenix{jsmith}1: a.out Type the name of the executable file at the prompt to run your program

18 Your First C Program # include <stdio.h> void main(void) {
printf(“Hello, CSCI 230!\n”); }


Download ppt "Welcome to CSCI 230! Problem Solving using C"

Similar presentations


Ads by Google