day01 - WELCOME TO CSE 142! instructor: benson limketkai...

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

View Full Document Right Arrow Icon
    1 WELCOME TO CSE 142! instructor: benson limketkai University of Da Nang, Summer 2008
Background image of page 1

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

View Full DocumentRight Arrow Icon
    2 Contact information E-mail: bensonl@cs.washington.edu Website: www.cs.washington.edu/homes/bensonl/ud
Background image of page 2
    3 Course meeting times June 23 – August 8 (excluding June 30 - July 11) Lecture: Mon – Fri (8h30 – 10h00) Lab: 06ECE: Mon – Fri (15h00 – 16h30) 07ECE: Mon – Fri (10h00 – 11h30)
Background image of page 3

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

View Full DocumentRight Arrow Icon
    4 Textbook “Beginning C: From Novice to Professional” Ivan Horton Textbook has some small errors If something does not seem right and you are not sure, ask! We won’t necessarily go in the same order as the book.
Background image of page 4
    5 Grade breakdown 40% homework 25% midterm 35% final
Background image of page 5

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

View Full DocumentRight Arrow Icon
    6 How to do well in this course Keep up with the assignments The course material is cumulative If you don’t understand something, ask questions (especially “WHY?”). There’s no such thing as a dumb question. Computers are neither magical nor mysterious. Everything can be explained!
Background image of page 6
    7 Basic C programs Readings: Chapter 1, pg. 1 - 20
Background image of page 7

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

View Full DocumentRight Arrow Icon
    8 Algorithmic thinking Writing programs requires knowing how to think algorithmically al·go·rithm: a step-by-step procedure for solving a problem or accomplishing some end especially by a computer
Background image of page 8
    9 Programming is just like Legos…
Background image of page 9

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

View Full DocumentRight Arrow Icon
Background image of page 10
Background image of page 11

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

View Full DocumentRight Arrow Icon
    12 Your first C program! C is a programming language . #include <stdio.h> int main() { printf("Hello world!"); } Save the program in a file named name .c where you replace name with any filename you want. What does this code output (print to the user) when you run (execute) it?
Background image of page 12
    13 Running a program Before you run a program, you must compile and link it. compiler: Translates a computer program written in one language (i.e., C) to another language (i.e., object code) linker: Combines object files and other required files into an executable Building is the process of compiling and linking a program into an executable (hammer icon in Quincy) compile object file ( hello.o ) executable ( hello.exe ) link output execute source code ( hello.c ) edit
Background image of page 13

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

View Full DocumentRight Arrow Icon
    14 Stages of programming Editing Compiling Linking Executing
Background image of page 14
    15 Program execution The output is printed to the console . Some editors pop up the console as another window.
Background image of page 15

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

View Full DocumentRight Arrow Icon
    16 Writing your own C programs #include <stdio.h> int main() { <statement>; <statement>; <statement>; } Every executable C program consists of a function called main that contains the statements (commands) to be executed You need this line if you want to use printf
Background image of page 16
    17 Syntax syntax: The set of legal structures and commands that can be used. Examples: Every basic statement ends with a semi-colon. The contents of a function occur between curly braces.
Background image of page 17

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

View Full DocumentRight Arrow Icon
    18 Syntax Errors syntax error: A problem in the structure of a program.
Background image of page 18
Image of page 19
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 69

day01 - WELCOME TO CSE 142! instructor: benson limketkai...

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

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