1 / 22

Lab 1: Getting started

ICE0125 Programming Fundamentals II – C/C++. Lab 1: Getting started. Instructor: Tran Minh Trung Email: trungtm@icu.ac.kr. Lab & homework regulations Introduction to programmer’s tools Working with Visual Studio 6.0 Logic building with C Lab assignments & Homework #1.

colby
Download Presentation

Lab 1: Getting started

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ICE0125 Programming Fundamentals II – C/C++ Lab 1: Getting started Instructor: Tran Minh Trung Email: trungtm@icu.ac.kr Lab & homework regulations Introduction to programmer’s tools Working with Visual Studio 6.0 Logic building with C Lab assignments & Homework #1

  2. Lab regulations • Lab instructor: • Reviews class lectures • Demonstrates and illustrates examples • Introduces Lab assignments • Help student to understand/solve problems • Student: • Try to SOLVE easy assignments and QUESTION on hard assignments • All have to stay and work on assignments till the end of the lab even when you think assignments are too easy (practicing is important).

  3. Homework regulations • There will be 10 hw assignments. • Due before after a week. • Late Acceptance: 50% penalty (No Exception). • How to submit: • Send email to: tuantla@icu.ac.kr • Subject: [ICE0125] (YouID ) Homework # • Attached files: • Source code • Readme (how to run program – if necessary) • Document for none programming homework • Note: You should compress files into one zip file with name: (Your student ID)_HW_#.zip • Eg.: 20042117_HW_1.zip

  4. Introduction to programmer’s tools • What do you need? • Text editor: WinEdit, VIM, Editplus …. • Compiler: • Why do you need a powerful programming tools? • To manage a project with hundreds to thousands files • To debug errors occurred in a program with thousands lines • To use thousands of syntaxes that you can’t remember • …. • Existing powerful programming tools • Microsoft Visual C ++; Bloodshed Dev C++; Borland C++

  5. MS. Visual C++ 6.0 • Create new project

  6. Select project type

  7. Select Console application type

  8. Compiling a program

  9. Building a program

  10. Execute a program

  11. Debug bar Right click on toolbar and select Debug option to show Debug bar Right click on the line that you want to Insert or Remove a Breakpoint

  12. Start debugging

  13. Debug functions

  14. Stopping at a Breakpoint The “Watch” window will show the values of the variables

  15. Checking a value of a variable

  16. Others debug functions • Step into • Step out • Step over • Run to cursor • Exceptions • Threads • Modules

  17. Review of Chapter 2 & 3 Logic building with C

  18. Chapter 2: Introduction to C programming • Memory Concepts • Understand variables: type, size, value • Arithmetic in C • Remember the precedence of arithmetic operators • Decision Making: Equality and Relational Operators • Remember the meaning and syntax of equality and relational operators

  19. Chapter 3: Structured Program Development in C • Basic problem-solving techniques • 2 important primary steps • Thorough understanding of the problem • Carefully plan an approach for solving it • Algorithms, Pseudo code, control structures • Top-down, stepwise refinement • 3 phases programming • Initialization, processing, and termination • Control statements • If…else, while, nested control, counter and sentinel controlled repetition • Operators: assignment, increment, decrement

  20. [Lab 1] assignments #1 • Chapter 2 • Try Example in Fig.2.13 (pg. 42) • Solve problem:2.19 (pg. 53)

  21. [Lab 1] assignments #2 • Chapter 3 • Try Example in Fig.3.9 (pg. 77) • Solve problem:3.20 (pg. 93)

  22. Homework • See the course website • http://ice0125.wordpress.com/2008/09/03/homework-1/ • Deadline: 12 PM (Midnight), September 11 2008.

More Related