Presentation is loading. Please wait.

Presentation is loading. Please wait.

Outcome based Learning Objectives

Similar presentations


Presentation on theme: "Outcome based Learning Objectives"— Presentation transcript:

1 Outcome based Learning Objectives
By the end of this course, students will be able to Understand the basic terminology in C Programming Write, Compile and debug programs written in C Use different data types in a C program Design programs using decision structure, loops and functions Explain the difference between call by value and call by reference Understand the dynamic of memory by using pointers Create/update basic data files KIIT UNIVERSITY

2 Course Contents KIIT UNIVERSITY Sr # Major and Detailed Coverage Area
Hrs 1 Introduction 3 Introduction to computer and it’s organization Computer hardware and memory Introduction to programming (High level/low level languages, procedural/structural programming) Introduction to Flowchart & Algorithm Number system representation 2 Variables, constants, Data types, Operators Types of variables and constants Console input/output operations (library functions) Operators Type casting Control statements 5 Decision control and branching statements (if, nested if and switch case statements, etc.) Looping control and their types (while, do-while, for, etc.) break and continue statements KIIT UNIVERSITY

3 Course Contents cont… KIIT UNIVERSITY Sr #
Major and Detailed Coverage Area Hrs 4 Arrays Introduction to Array Single Dimensional Array Multidimensional array Mid Semester 5 Functions Library & User defined Functions, Formal and Actual parameters Declaring, defining and calling functions Parameter Passing – call-by-value and call-by-reference, Recursion 6 Storage Classes 2 Different types of storage classes – (auto, static, extern, register) 7 Strings Character Arrays and Strings, String Manipulation 8 Pointers 3 Pointer variable, Pointer Arithmetic, Passing parameters by reference, Pointer to pointer, Pointer to functions KIIT UNIVERSITY

4 Course Contents cont… KIIT UNIVERSITY Sr #
Major and Detailed Coverage Area Hrs 9 User Defined Data Types – Structures and Unions 3 Structure: definition, structure variable, creation, initialization and assignment Pointers to structures Union and their uses Enum and their uses 10 Dynamic Memory Allocation 2 Memory allocation functions (malloc, calloc, realloc, etc.) Memory de-allocation function (free) 11 File Handling File operations - opening, closing, reading, writing etc. 12 Additional Features Command line arguments Bitwise operators Macros End Semester KIIT UNIVERSITY

5 Recommended Books KIIT UNIVERSITY Textbook
Computer fundamentals and programming in C – Pradip Dey & Manas Ghosh, Second Edition 2013, OXFORD University Press Reference Books Programming in C – Bryon Gottfried, Third Edition. 2010, TMH The ‘C’ programming language – Ritchim Kenighan, Second Edition, 2012 D.M. Ritche, PHI Programming in ANSI C – E. Balaguruswami, Sixth Edition, TMH C The Complete Reference – H. Sohildt, Fourth Edition, 2000 TMH Let us C – Y. Kanetkar, Twelfth Edition, 2012 BPB Publications Computer Science – A Structured Programming Approach using C – B.A. Forouzan & R.F Gillberg,, Third Edition, 2007, Cengage Learning KIIT UNIVERSITY

6 Evaluation and Prerequisites
Grades will be based on Pass mark Assignments/class test/quiz = 15 marks Midterm exam - 25 marks End term exam - 60 marks Pass mark – 40 Prerequisites Grades NIL O – greater than or equal to 90 E - greater than or equal to 80 A – greater than or equal to 70 B - greater than or equal to 60 C - greater than or equal to 50 D – greater than or equal to 40 F – Less than 40 KIIT UNIVERSITY

7 What is a computer? A computer is an electronic device, operating under the control of instructions (i.e. software) stored in its own memory unit, that can: accept data (input) manipulate data (process) produce results (output) store the results (storage) Computer system is used to describe a collection of devices that function together as a system. What are the collection of devices? KIIT UNIVERSITY

8 Devices that comprise a computer system
KIIT UNIVERSITY

9 Data and Information All computer processing requires data, which is a collection of raw facts, figures and symbols, such as numbers, words, images, video and sound, given to the computer during the input phase. Computers manipulate data to create information. Information is data that is organized, meaningful, and useful. During the output Phase, the information that has been created is put into some form, such as a printed report. The information can also be put in computer storage for future use. KIIT UNIVERSITY

10 Computer system organization
KIIT UNIVERSITY

11 Input Device KIIT UNIVERSITY
An input device is any hardware component that allows you to enter data and instructions into a computer. A keyboard is an input device that contains keys users press to enter data and instructions into the computer A mouse is a pointing device that fits comfortably under the palm of your hand Most notebook computers have a touchpad, a small, flat, rectangular pointing device KIIT UNIVERSITY

12 System Unit KIIT UNIVERSITY

13 Output Devices KIIT UNIVERSITY
Output devices are hardware components that convey information to one or more people. A printer is an output device that produces text and graphics on a physical medium such as paper Ink-jet printer Photo printer Laser printer Multifunction peripheral (all-in-one device) KIIT UNIVERSITY

14 Display Device KIIT UNIVERSITY
A display device is an output device that visually conveys text, graphics, and video information. LCD monitors use a liquid crystal display to produce images on the screen KIIT UNIVERSITY

15 Storage Devices A storage device is the computer hardware that records and/or retrieves items to and from storage media. A hard disk is a storage device that contains one or more inflexible, circular platters that use magnetic particles to store data, instructions, and information in tracks and sectors KIIT UNIVERSITY

16 Storage Devices cont… An external hard disk is a separate freestanding hard disk that connects with a cable to a port on the system unit and communicates A removable hard disk is a hard disk that you insert and remove from a drive. KIIT UNIVERSITY

17 Storage Devices cont… Flash memory is a type of memory that can be erased electronically and rewritten A memory card is a removable flash memory device, usually no bigger than 1.5 inches in height or width, that you insert and remove from a slot in a computer, mobile device, or card reader/writer KIIT UNIVERSITY

18 Storage Devices A USB flash drive, sometimes called a thumb drive, is a flash memory storage device that plugs into a USB port on a computer or mobile device KIIT UNIVERSITY

19 Communication Devices
A communications device is a hardware component that enables a computer to send (transmit) and receive data, instructions, and information to and from one or more computers KIIT UNIVERSITY

20 Software Software consists of a series of instructions, organized for a common purpose, that tells the computer hardware what tasks to perform and how to perform them. This set of instructions is sequenced and organized in a computer program. Therefore, a program is a series of instructions which is intended to direct a computer to perform certain functions and executed by the processors. So in broader sense Software can be described as a set of related programs and it is more than a collection of programs. KIIT UNIVERSITY

21 Software cont… Software System software is designed to facilitate and coordinate the use of the computer by making hardware operational. It interacts with the computer system at low level. Examples are operating system, loader, linker etc Application software is designed to perform specific usages of the users. Examples are Microsoft Word, Microsoft Excel, Microsoft Power Point, Microsoft Access, Page Maker, Coral Draw, Photoshop, Tally, AutoCAD, Acrobat, Win Amp, Micro Media Flash, iLeap, Xing MP3 Player etc KIIT UNIVERSITY

22 Hardware Hardware is the physical components of a computer that includes all mechanical, electrical, electronic and magnetic parts attached to it. A computer consists of the following major hardware components: I/O i.e. Input/output devices CPU i.e. central processing unit Memory unit and storage devices Interface unit KIIT UNIVERSITY

23 Hardware cont… Hardware is the physical components of a computer that includes all mechanical, electrical, electronic and magnetic parts attached to it. A computer consists of the following major hardware components: I/O i.e. Input/output devices CPU i.e. central processing unit Memory unit and storage devices Interface unit KIIT UNIVERSITY

24 Input devices The data and instructions are typed, submitted, Or transmitted to a computer through input devices. Most common input devices are : Keyboard Mouse Scanner Touchpad KIIT UNIVERSITY

25 Output devices Output devices display the output results of the operations on the input data or to print the data. Most common output devices are : Monitor Printer KIIT UNIVERSITY

26 CPU CPU can be thought of as the brain of the computer where most of the processing takes place. During processing, it locates and executes the program instructions and fetches data from memory and input/output devices and sends back the computed data. It is divided into following functional units Registers - These are high-speed storage devices. In most CPUs, some registers are reserved for special purposes. ALU (Arithmetic logic unit) - part of the CPU that performs arithmetic operations, such as addition and subtraction as well as logical operations, such as comparing two numbers to see if they are the equal or greater or less. CU (Control unit) - coordinates the processing by controlling the transfer of data and instructions between main memory and the registers in the CPU. KIIT UNIVERSITY

27 Memory Unit Components such as the I/O devices and CPU are not sufficient for the working of the computer and hence the storage area is needed to store instructions and data either temporarily or permanently so that subsequent retrieval of the instructions and data can be possible on demand. Data are stored in the memory as binary digits, called bits. Data of various types are encoded as series of bits and stored in consecutive memory locations. Each memory location is comprises of a single byte which is equals to 8 bits and has a unique address so that the contents of the desired memory locations can be accessed independently by referring to its address. A single data item is stored in one or more consecutive bytes of memory. The address of the first byte is used as the address of the entire memory location. KIIT UNIVERSITY

28 Unit of memory KIIT UNIVERSITY

29 Interface Unit The interface unit interconnects the CPU with memory and also with the various input/output (I/O) devices and hence the instructions and data move between the CPU and other hardware components through it. It is a set of parallel wires or lines which connects all the internal computer components to the CPU and main memory. Depending on the type of data transmitted, a bus can be classified into the following three types: Data bus : The bus used to carry actual data Address bus memory or Input/output device : Addresses travel via the address bus. Control bus: This bus carries control information between the CPU and other devices within the computer. KIIT UNIVERSITY

30 Bus based computer organization
KIIT UNIVERSITY

31 Computer Memory Primary memory – It is the area where data and programs are stored while the program is being executed along with the data. This is also known as main memory forms the working area of the program and is accessed directly by the processor. Secondary memory – It is where programs and data are kept on a long-term basis. Common secondary storage devices are the hard disk and optical disks. The hard disk has enormous storage capacity compared to main memory. It is also known as auxiliary memory that stores huge volume of data at a less cost than primary memory devices KIIT UNIVERSITY

32 Computer Memory cont… Cache – Cache memory is a small-sized type of volatile computer memory that provides high-speed data access to a processor and stores frequently used computer programs, applications and data. It stores and retains data only until a computer is powered up. Registers - A special, high-speed storage area within the CPU. All data must be represented in a register before it can be processed. For example, if two numbers are to be multiplied, both numbers must be in registers, and the result is also placed in a register. KIIT UNIVERSITY

33 Memory hierarchy KIIT UNIVERSITY

34 Layered view of the Computer
Application Programs Word-Processors, Spreadsheets, Database Software, IDEs, etc… System Software Compilers, Interpreters, Preprocessors, etc. Operating System, Device Drivers Machine with all its hardware KIIT UNIVERSITY

35 Operating System (OS) Provides several essential services:
Loading & running application programs Allocating memory & processor time Providing input & output facilities Managing files of information KIIT UNIVERSITY

36 Programming Languages
Programs are written in programming languages (i.e. PL). A PL is A special purpose language A set of rules and symbols used to construct a computer program A language used to interact with the computer KIIT UNIVERSITY

37 Computer Languages KIIT UNIVERSITY Machine Language Uses binary code
Machine-dependent Not portable Assembly Language Uses mnemonics Not usually portable High Level Language Uses English-like language Machine independent Portable (but must be compiled for different platforms) Examples: Pascal, C, C++, Java, Fortran, . . . Low Level Language KIIT UNIVERSITY

38 Programming Languages
Procedural Language The given problem is divided in to a number of sub problems depending upon its functionality. The sub problems are called procedures or Methods. Any procedure can be called at any point during the program execution. The program has global and local variables. E.g. Fortran, COBOL Structural Language The program is divided into modules and the modules are then divided into functions. The usage of goto statement is removed or reduced. Each module can work independent of one another. E.g. Algol, Pascal, C KIIT UNIVERSITY

39 Programming Languages cont…
Procedural Programming Structural Programming KIIT UNIVERSITY

40 Algorithm KIIT UNIVERSITY
A step by step procedure for solving a particular problem is an Algorithm. To be an algorithm, a set of rules must be unambiguous and have a clear stopping point. Algorithms can be expressed in any language, from natural languages like English or French to programming languages like C++, C. Problem - Design an algorithm to add two numbers and display the average. Step 1 − START Step 2 − input x Step 3 − input y Step 4 − sum = a + b Step 5 – average = sum / 2 Step 5 − display average Step 6 − END KIIT UNIVERSITY

41 Flowchart KIIT UNIVERSITY
A flowchart is a graphical representation of an algorithm. These flowcharts play a vital role in the programming of a problem and are quite helpful in understanding the logic of complicated and lengthy problems. Once the flowchart is drawn, it becomes easy to write the program in any high level language. Often we see how flowcharts are helpful in explaining the program to others. Hence, it is correct to say that a flowchart is a must for the better documentation of a complex program. Standard Symbols: KIIT UNIVERSITY

42 Flowchart Guidelines KIIT UNIVERSITY
In drawing a proper flowchart, all necessary requirements/steps should be listed out in logical order. The flowchart should be clear, neat and easy to follow. There should not be any room for ambiguity in understanding the flowchart. The usual direction of the flow of a procedure or system is from left to right or top to bottom Only one flow line should come out from a process symbol Only one flow line should enter a decision symbol, but two or three flow lines, one for each possible answer, should leave the decision symbol. KIIT UNIVERSITY

43 Flowchart Guidelines KIIT UNIVERSITY
If the flowchart becomes complex, it is better to use connector symbols to reduce the number of flow lines. Avoid the intersection of flow lines if you want to make it more effective and better way of communication. Ensure that the flowchart has a logical start and finish. It is useful to test the validity of the flowchart by passing through it with a simple test data. KIIT UNIVERSITY

44 Flowchart KIIT UNIVERSITY
Below is the flowchart to add two numbers and display the average KIIT UNIVERSITY

45 Number System System Base Symbols Used by humans? Used in computers?
Decimal 10 0, 1, … 9 Yes No Binary 2 0, 1 Octal 8 0, 1, … 7 Hexa- decimal 16 0, 1, … 9, A, B, … F KIIT UNIVERSITY

46 Number System Conversion
The possibilities: Decimal Octal Binary Hexadecimal KIIT UNIVERSITY

47 Binary to Decimal KIIT UNIVERSITY Technique:
Multiply each bit by 2n, where n is the “weight” of the bit The weight is the position of the bit, starting from 0 on the right Add the results => x 20 = x 21 = x 22 = x 23 = x 24 = x 25 = 32 4310 Bit “0” KIIT UNIVERSITY

48 Decimal to Binary KIIT UNIVERSITY Technique:
12510 = ?2 Technique: Continuously divide by two to give a result and keep track of the reminder until the final result equals to 0 12510 = KIIT UNIVERSITY

49 Thank You KIIT UNIVERSITY


Download ppt "Outcome based Learning Objectives"

Similar presentations


Ads by Google