Docsity

Programming Languages-Computer Fundamentals-Lecture Slides, Slides of Computer Fundamentals

Partial preview of the text

Download Programming Languages-Computer Fundamentals-Lecture Slides and more Slides Computer Fundamentals in PDF only on Docsity!

ISE105: Compu.ng Fundamentals Lecture 7

Today’s Lecture

  • Programming Languages
  • History of C
  • Problem Solving
    • Flowcharts
    • Algorithms
    • Programs
  • C Program
  • Comments

Types of Programming Languages

  1. Machine languages (1GL)
    • Strings of numbers giving machine specific instruc.ons
    • Example:
  2. Assembly languages (2GL)
    • English‐like abbrevia.ons represen.ng elementary computer opera.ons (translated via assemblers)
    • Example: LOAD BASEPAY ADD OVERPAY STORE GROSSPAY 4

Types of Languages

  1. High‐level languages (3GL)
    • Codes similar to everyday English
    • Use mathema.cal nota.ons (translated via compilers)
    • Example: grossPay = basePay + overTimePay Languages:
      • C, C++, Java, FORTRAN, COBOL, Pascal 5

Development of Programming

Languages

• 2000  C#

  • 2001  Visual Basic .NET . . . .
  • 2009  Go by Google Inc. (Similar to C)

A brief history of C

  • Developed Dennis M. Ritchie at AT&T Bell Labs between 1969–1973 for UNIX
  • Descendant of Ken Thompson’s language “B”
  • First published specifica.on standard:
    • Ritchie and Brian Kernighan “The C Programming Language” in 1978
    • C‐dialect now known as K&R‐Style
  • Ease of portability language began to spread
  • However language standard (K&R) insufficiently precise
  • A slightly modified version of K&R was standardised by ANSI 1989 - C‐dialect now known as ANSI‐C
  • The latest revision of the Standard is C99 (ISO)
  • ISO/IEC JTC1/SC22/WG14 is the interna.onal standardiza.on working group for the programming language C.

C and C++

  • C++ is descended from C
    • Wriken by Bjarne Stroustrup during 1983‐
    • Originally called “C with Classes”
  • ISO/IEC JTC1/SC22/WG21 has produced the standard ISO/IEC 14882:1998 on the programming language C++.
  • A technical corrigendum was approved in
  • C and C++ are different languages

C and C++ popularity

(www..obe.com)

Assemblers

  • Assembler
    • “An assembler is a program that translates the assembly‐language program into machine language. ” McGraw‐Hill

Interpreter

  • Interpreter – translates code one line at a .me
    • “Translates language statements into machine language and execute it immediately, statement by statement ” McGraw‐Hill
  • Interpreted Languages
    • Basic
    • JavaScript
    • LISP

Syntax and Seman.cs

  • Syntax
    • Computer Program (language)
    • What are the legal expression in the language
  • Seman.cs
    • Meaning of the program
    • Gives meaning to the program.

Developing a program

Problem solving phase Implementation phase

Defini.ons

  • Algorithm
    • A sequence of language independent steps which may be followed to solve a problem.
  • Flowchart
    • Diagramma.c representa.on of steps for solving the given problem.
  • Program
    • A precise sequence of steps to solve a par.cular problem
  • Programming languages
    • Languages for specifying sequences of direc.ons to a computer.