Download presentation
Presentation is loading. Please wait.
Published byJack Chase Modified over 11 years ago
2
Etter/Ingber Engineering Problem Solving with C Fundamental Concepts Chapter 1 Engineering Problem Solving
3
Etter/Ingber Computing Systems: Hardware and Software 4 A computer is a machine designed to perform operations specified with a set of instructions called a program. 4 Hardware refers to the computer equipment. –keyboard, mouse, terminal, hard disk, printer 4 Software refers to the programs that describe the steps we want the computer to perform.
4
Etter/Ingber CPU Computer Hardware 4 CPU - Central processing unit 4 ALU - Arithmetic and logic unit 4 ROM - Read only memory 4 RAM - Random access memory Internal Memory External Memory InputOutput Processor ALU
5
Etter/Ingber Computer Software 4 Operating System - Provides an interface with the user –unix, windows, linux,... 4 Software Tools –word processors (MicrosoftWord, WordPerfect,...) –spreadsheet programs (Excel, Lotus1-2-3,...) – mathematical computation tools (MATLAB, Mathematica,...) 4 Computer Languages –machine language –assembly language –binary language –high level languages (C, C++, Ada, Fortran, Basic, java)
6
Etter/Ingber Executing a Computer Program 4 Compiler –Converts source program to object program 4 Linker –Converts object program to executable program CompileLink/loadExecute C language program Machine language program Program output Input data
7
Etter/Ingber Key Terms 4 Source Program –printable/Readable Program file 4 Object Program –nonprintable machine readable file 4 Executable Program –nonprintable executable code 4 Syntax errors –reported by the compiler 4 Linker errors –reported by the linker 4 Execution/Run-time errors –reported by the operating system 4 Logic errors –not reported
8
Etter/Ingber The C Programming Language 4 General purpose, machine-independent language 4 Developed at Bell Labs in 1972 by Dennis Ritchie 4 American National Standards Institute(ANSI) approved ANSI C standard in 1989
9
Etter/Ingber An Engineering Problem-Solving Methodology 1. PROBLEM STATEMENT 2. INPUT/OUTPUT DESCRIPTION 3. HAND EXAMPLE 4. ALGORITHM DEVELOPMENT 5. TESTING
10
Etter/Ingber First Program - sum two numbers /******************************************************************/ /* Program chapter1 */ /* */ /* This program computes the sum two numbers */ #include int main(void) { /* Declare and initialize variables. */ double number1 = 473.91, number2 = 45.7, sum; /* Calculate sum. */ sum = number1 + number2; /* Print the sum. */ printf(The sum is %5.2f \n, sum); /* Exit program. */ return 0; } /***************************************************************************/
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.