Docsity

Progamming Fundamentals, Lecture notes of C programming

Partial preview of the text

Download Progamming Fundamentals and more Lecture notes C programming in PDF only on Docsity!

Programming

Fundamentals

Lecture 1 4/17/ Mehr un Nisa Programminf Fundamentals 1

4/17/ Mehr un Nisa Programminf Fundamentals 2 Office: STD- Office Hours: Tuesday, Thursday, Friday : 10:

  • 12:

Books

Text Book :

  1. C++ Programming from Problem Analysis to Design By DS Malik Reference Book:
  • (^) C++ How to Program by P. J. Deitel and H. M. Deitel

Class Rules and Policy

  • (^) Attendance and Punctuality: All students coming late after 10 minutes will be marked absent from the start of the class.
  • (^) Dress Code: UMT dress code policy will be strictly enforced in class including display of the id cards.
  • (^) Cell phones: must be off during the lecture.
  • (^) Plagiarism: Plagiarism is a crime and is strictly discouraged. May lead to F. 4/17/ Mehr un Nisa Programminf Fundamentals 5

BASICS 4/17/ Mehr un Nisa Programminf Fundamentals 7

What is a Computer?

  • (^) Computer is an electronic device (machine) that has the capacity to: - (^) Get data from User INPUT - (^) Process dataPROCESS - (^) Give processed information to User OUTPUT - (^) Store information for future reference STORAGE 8

Components of a Computer System Computer Hardware

  • (^) Input Devices
  • (^) Output Devices
  • (^) Storage Devices
  • (^) Processing Devices Computer Software
  • (^) System Software
  • (^) Operating System
  • (^) Hardware Drivers
  • (^) Application Software 10

Components of a Computer

System

Data

  • (^) Number
  • (^) Text
  • (^) Audio
  • (^) Image
  • (^) Video User
  • (^) Developers
  • (^) End Users 11

Computer Hardware

  • (^) Computer Hardware are those components (parts) of computer that physically exist.
  • (^) These are tangible devices.
  • (^) Computer hardware facilitates the program to run on a computer.
  • (^) A computer cannot work without hardware. 13

Computer Hardware

Categories

14

1 - Input Devices โ€“

Examples

  • (^) Keyboard
  • (^) Mouse
  • (^) Microphone
  • (^) Trackball
  • (^) Touchpad
  • (^) Joystick
  • (^) Scanner 16

2 - Output Devices โ€“ Examples

  • Monitor
  • (^) Printer
  • (^) Stereo Speakers
  • Headphones

Input/Output Device

  • (^) Touch Screen
  • (^) Communication Devices
    • (^) Modems 17

Memory Devices Types

  • (^) There are two main types of memories - (^) Primary/Main Memory - (^) Directly or indirectly connected to CPU via a device known as BUS - (^) Secondary Memory - (^) Mainly focused to store data permanently - (^) Not directly accessible by the CPU, hence these devices are comparatively slower 19

3.1 Primary/Main Memory

Types

  • (^) Random Access Memory (RAM)
    • (^) A random-access device allows stored data to be accessed quickly in any random order
    • (^) RAM is volatile memory
  • (^) Read Only Memory (ROM)
    • (^) ROM performs only read function and data stored in ROM cannot be modified
    • (^) Mainly used to distribute firmware
    • (^) ROM is non-volatile memory 20