engineering problem solving with c
Download
Skip this Video
Download Presentation
Engineering Problem Solving with C

Loading in 2 Seconds...

play fullscreen
1 / 9

Engineering Problem Solving with C - PowerPoint PPT Presentation


  • 87 Views
  • Uploaded on

Engineering Problem Solving with C. Fundamental Concepts Chapter 1 Engineering Problem Solving. Computing Systems: Hardware and Software. A computer is a machine designed to perform operations specified with a set of instructions called a program.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Engineering Problem Solving with C' - tivona


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
engineering problem solving with c

Engineering Problem Solving with C

Fundamental Concepts

Chapter 1

Engineering Problem Solving

Etter/Ingber

computing systems hardware and software
Computing Systems: Hardware and Software
  • A computer is a machine designed to perform operations specified with a set of instructions called a program.
  • Hardware refers to the computer equipment.
    • keyboard, mouse, terminal, hard disk, printer
  • Software refers to the programs that describe the steps we want the computer to perform.

Etter/Ingber

computer hardware
Computer Hardware
  • CPU - Central processing unit
  • ALU - Arithmetic and logic unit
  • ROM - Read only memory
  • RAM - Random access memory

Internal

Memory

External

Memory

CPU

Processor

Input

Output

ALU

Etter/Ingber

computer software
Computer Software
  • Operating System - Provides an interface with the user
    • unix, windows, linux, ...
  • Software Tools
    • word processors (MicrosoftWord, WordPerfect, ...)
    • spreadsheet programs (Excel, Lotus1-2-3, ...)
    • mathematical computation tools (MATLAB, Mathematica, ...)
  • Computer Languages
    • machine language
    • assembly language
    • binary language
    • high level languages (C, C++, Ada, Fortran, Basic, java)

Etter/Ingber

executing a computer program
Executing a Computer Program

Input data

  • Compiler
    • Converts source program to object program
  • Linker
    • Converts object program to executable program

Compile

Machine

language

program

Link/load

Execute

C language

program

Program

output

Etter/Ingber

key terms
Key Terms
  • Source Program
    • printable/Readable Program file
  • Object Program
    • nonprintable machine readable file
  • ExecutableProgram
    • nonprintable executable code
  • Syntax errors
    • reported by the compiler
  • Linker errors
    • reported by the linker
  • Execution/Run-time errors
    • reported by the operating system
  • Logic errors
    • not reported

Etter/Ingber

the c programming language
The C Programming Language
  • General purpose, machine-independent language
  • Developed at Bell Labs in 1972 by Dennis Ritchie
  • American National Standards Institute(ANSI) approved ANSI C standard in 1989

Etter/Ingber

an engineering problem solving methodology
An Engineering Problem-Solving Methodology
  • 1. PROBLEM STATEMENT
  • 2. INPUT/OUTPUT DESCRIPTION
  • 3. HAND EXAMPLE
  • 4. ALGORITHM DEVELOPMENT
  • 5. TESTING

Etter/Ingber

first program sum two numbers
First Program - sum two numbers

/******************************************************************/

/* Program chapter1 */

/* */

/* This program computes the sum two numbers */

#include <stdio.h>

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;

}

/***************************************************************************/

Etter/Ingber

ad