Title: Distance Learning Center
1Distance Learning Center
- Lecture 1
- C Programming Language with Applications
- Melissa Lin, IT Consultant
- HenEm, Inc. Parkville, Missouri
- linm_at_ipfw.edu
- http//www.etcs.ipfw.edu/linm
2Lecture 1
- Introduction Objectives of the Course and
Course Outcomes - An Overview of Programming Languages
- The Structure and Operation of a Computer
- An Introduction of Computer Organization
- Types of Programming Languages
- Brief History Of C Language
- The C Standard Library
- C Program Development Environments
- Using Microsoft Visual Studio .NET2003 (VS .NET)
- Installation of Visual Studio .NET2003
- Example 1-1 A Welcome Program
3Syllabus
- WebCT http//webct.ipfw.edu/
- Web Site http//www.etcs.ipfw.edu/linm
- Email Use WebCT email for this class
- linm_at_ipfw.edu
- Test Date February 14 16, 2005
- March 28 30, 2005
- May 2 4, 2005
- Grading Homework Projects 70 Quizzes
Exams 30 - Emergency Advice or Support ET221B, Professor
Paul Lin at 260-481-6339 or lin_at_ipfw.edu
4The Course Outcomes
- An ability to use VS .NET C application
development tools and acquire good knowledge of
Cs keywords, data types and structures, control
structures, and program organization - An ability to apply knowledge of mathematics,
science, engineering and technology in problem
solving using C programming language - Knowledge and skills of applying structure
programming methods and techniques - Knowledge of problem solving and software
development process including analysis, design,
implementation, and maintenance - Ability to prepare written memos, documentation,
reports, etc - To understand professional and ethical
responsibility - Understand the contemporary software application
issues
5Text Book References
- Text book
- C How to Program 4th Edition by Deitel Deitel,
Prentice Hall, ISBN 0-13-142644-3 - References
- The C Programming Language by Brian W. Kernighan
/ Dennis M Ritchie, Prentice Hall, ISBN
0-13-110370-9 - Object-Oriented Analysis and Design with
Applications by Grady Booch, The
Benjamin/Cummings Publishing Company, Inc., ISBN
0-8053-5340-2 - C and Unix Tools for Software Design by Martin L.
Barrett / Clifford H. Wagner, John Wiley Sons,
Inc., ISBN 0-471-30927-3 - C Program Design by James P. Cohoon / Jack W.
Davidson, WCB/McGraw-Hill, ISBN - 0-07-236225-1
6Overview of Programming
- The Structure and Operation of a Computer
- Computer system hardware and software
- Processor (registers, primitive operations)
- Main memory (RAM, ROM)
- Data types (integers, real, floating-point
numbers, strings, etc.) - Sequence and Data Control
- Storage management
- Operating environment
Reference Computer Functions and Applications,
by P. Lin http//www.etcs.ipfw.edu/lin/Presentati
on/CompNetApps11_17_files/frame.htm
7Overview of Programming (continue)
8Major Components of Computer Systems
- Input Unit (keyboard, mouse, scanner, Internet
through TCP/IP) - Central Processing Unit (CPU)
- Output Unit
- Memory Unit
- Primary memory (RAM, ROM)
- Secondary memory (Hard drives, zip disks, floppy
disks, etc)
9Programming Languages
- Low-Level Languages
- Machine instructions in binary strings
- Assembly languages (for Intel 80486, Pentium,
etc) - High-Level Languages
- ADA
- C programming language
- Perl
10Programming Languages (continue)
- Object-Oriented Languages
- C
- Java
- Object-Based, Event Driven Programming Languages
- Visual BASIC
- Component-Based Programming Languages
- Visual BASIC.NET, C
11A Brief History Of C
- History
- Developed by Dennis Ritchie and his team at Bell
Lab, AT T, New Jersey - C programming language (1972)
- A language to replace B language
- The language was developed to replace the UNIXs
assembly language code - The book C Programming Language (1st edition
1978, 2nd edition 1989)
12A Brief History Of C (continue)
- History
- American National Standard Institute (ANSI) C
standard (1983 - 1989) - Defines Architecture, syntax, standard library
functions - ANSI C standard was finally established in
December of 1989 - Document number X3J11/99-090
13C Standard Library
- C programs consist of modules which are called
functions. Most existing functions are stored in
C Standard Library. - When coding C programs, you will use the
following functions to create C programs - C Standard Library functions
- Functions you create yourself
- Functions other people have created and made
available to you
14C Programming Development Environment
- C Programming Environment includes
- A Program development system
- The C language
- The C Standard Library
- C Programs are developed through the following
phases - Program Editing
- Preprocessing
- Compiling
- Linking
- Loading
- Execution
15C Programming Development Environment (continued)
- C Compilers for different computer platforms
- Mainframe computers
- Personal computers (Borland C, Microsoft Visual
C) - Microcontrollers
- Digital Signal Processors
16C Programming Development Environment (continued)
- Three C Development Tools
- Microsoft Visual Studio .NET2003
- Microsoft Visual C version 6.0 on your textbook
program disk - C Compiler for Linux running on an Intel-based PC.
17Installing Microsoft Visual Studio .NET
- System requirements
- Install the Microsoft Visual Studio .NET
framework - This is one of the Windows XP updates, listed as
recommended - Insert the Microsoft Visual Studio .NET CD
- Approximately 2 GBytes of disk space is used
- Help files (MSDN) are valuable
- Can also install VB.NET, C/C C if desired
- Follow items 1, 2, and 3 on the setup screen to
complete your installation
18Microsoft Visual Studio .NET Web Sites References
- Paul D. Sheriff, PDSA, Inc.
- A Web Introduction to VB.NET
- Learn to start a new project with Microsoft
Visual Studio.NET - Learn how to configure your development
environment - MSDN Home page
- http//msdn.microsoft.com/
19Using Microsoft Visual Studio .NET
- Click on -gt Start
- Choose -gt All Programs
- Choose -gt Microsoft Visual Studio .NET 2003
- Click on -gt Microsoft Visual Studio .NET 2003
20Using Microsoft Visual Studio .NET (continue)
- Click on -gt File
- Choose New
- Then Project
21Using Microsoft Visual Studio .NET (continue)
- Choose Visual C Projects from Project Types
- Choose Win32 Console Project from Templates
- Name a project in the Name field
- Specify the appropriate location
22Using Microsoft Visual Studio .NET (continue)
- Select -gt Application Settings
- Check -gt Console Application
- Check -gt Empty Project
- Click on Finish
23Using Microsoft Visual Studio .NET (continue)
Click on -gt File -gt Add New Item
24Using Microsoft Visual Studio .NET (continue)
- Choose -gt Visual C from
- Categories
- Choose -gt C File (.cpp)
- Name a project in the Name field
- Specify an appropriate location
25Use Microsoft Visual Studio .NET (continue)
Add New Item
New Project
Open File
Menu bar
Save
Step Into
Project Name
Step Over
Work Environment
26Using Microsoft Visual Studio .NET (continue)
block
A statement
27Using Microsoft Visual Studio .NET (continue)
- include ltstdio.hgt - tells the preprocessor to
include the contents of the standard input/output
header file stdio.h in the program - int main() every C program begins executing at
the function main - printf("Welcome to C Programming \n")
- printf() function instructs the computer to
print the string of messages marked by the
quotation marks on the screen. - \n newline
28Using Microsoft Visual Studio .NET (continue)
Save project1.cpp As
29Using Microsoft Visual Studio .NET (continue)
Save as project1.c
Choose C source File
30Using Microsoft Visual Studio .NET (continue)
project1.c
31Using Microsoft Visual Studio .NET (continue)
Add Existing Item
32Use Microsoft Visual Studio .NET (continue)
Select project1.c
33Use Microsoft Visual Studio .NET (continue)
34Use Microsoft Visual Studio .NET (continue)
Click on Build, then Build Solution
35Use Microsoft Visual Studio .NET (continue)
36Use Microsoft Visual Studio .NET (continue)
Click on Debug, then Start without Debugging
37Use Microsoft Visual Studio .NET (continue)
38Summary
- Course Introduction Objective of the Course
- An Overview of Programming Languages
- The structure and Operation of a computer
- Programming Languages
- Type of Programming Languages
- Brief History Of C
- Use Microsoft Visual Studio .NET
- Next class Creating and running C under Linux
environment Microsoft Visual C 6.0.
39Question?
- Answers
- Email linm_at_ipfw.edu