Sharda University
Pradeep Kr. Mishra
(Asst.Prof)
Department of Information Technology
Subject Name: Basics of Computer & C Programming
Basics of Computer & C Programming
BASICS of COMPUTER & C PROGRAMMING
IT Term 1
UNIT 1
(8 hours)
Fundamentals of Computer:
Computer: Introduction, computer generations, components of PC, classification of computers, storage devices.
Software: Introduction, types of software, overview of operating system.
Computer languages: Introduction, generation of languages, translators.
Number system: binary, decimal, octal, hexadecimal
UNIT 2
(10 hours)
Algorithms:
Flowchart: components of flowchart, design of flowchart for various problems.
Algorithm: definition, characteristics, uses of algorithms, development of algorithms, recursive algorithms.
Pseudocode: definition and use.
Fundamentals of C:
Elements of C: History, introduction to C programming language, structure of a C program, compilation and execution of C program, data types, variables, modifiers,
identifiers and keywords, symbolic constants, storage classes, operators and expressions, enumerations, macros, C preprocessor, control statements and loops.
UNIT 3
(6 hours)
Arrays: one dimensional and multi dimensional array, declaration, initialization and array manipulation, array as parameters.
Functions: built-in and user-defined, function declaration, definition and function call, parameter passing: call by value, call by reference, recursive functions, string handling
functions.
UNIT 4
(8 hours)
Strings: initializing of strings, assigning values to strings, converting strings to other types, library functions for manipulation.
Pointers: pointers & addresses, pointers & arrays, pointers & function arguments, address arithmetic, character pointers and functions, pointers to pointer, array of pointers.
UNIT-5
(8 hours)
Structures & Unions: definition, initializing, assigning values, unions.
File handling: opening and closing a data file, creating a data file, I/O operations on files.
Text Books:
1. P K Sinha, Computer Fundamentals, BPB
2. Balagurusamy, E programming in ANSI C 2/e, TMH
References:
Complete Reference C, Herbert Schildt, BPB Publications.
A book on C, Era Pohl and Kelly, Pearson Education.
Kanetkar, Yashvant, Let Us C, 4/e, BPB publications.
Basics of Computer & C Programming
SHARDA UNIVERSITY Gr. Noida
SCHOOL OF ENGINEERING AND TECHNOLOGY
Lecture Plan Details
Session: 2011-12
Term: 1
Name of Faculty: Pradeep Kr.Mishra
Department: Information Technology
Course Name: B.Tech
L( 3 )T( 1 )P( 0 )
Subject Name: Basics of Computer & 'C' Programming
Delivery Date
Remark
UNIT 1
1
2
3
4
5
6
7
8
Fundamentals of Computer:
Computer :Introduction, Computer Generations
Components of PC
Classification of computers
Storage devices
Computer languages :Introduction and generation of languages
Number System binary Decimal
Octal and hexadecimal
Numerical examples
Basics of Computer & C Programming
UNIT 2
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Algorithms & Fundamentals of C:
Flowchart: Components of flow charts
Design of Flowchart for various Problems
Algorithm :Definition, Characteristics, Development and uses of algorithms
Recursive algorithms, Pseudo code: Definition and use
Elements of C:History Introduction to Programming Language
Structure of C program, Compilation and execution of c program
Data types, Variable, Constants, Identifier and keywords
Storage classes Operators and Expressions Enumerations
Macros, C preprocessor
Control statements and loop
UNIT 3: Arrays & Function
Array One dimensional and multi dimensional arrays : Declarations, Initialization and array manipulation
Array as parameters, Functions: Definition, Function Declaration Types of function
Function call,
Parameter passing call by value, call by reference
Recursive and string handling functions
Examples
Basics of Computer & C Programming
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Text Books:
UNIT 4: String & Pointers:
Introduction to strings
Working with strings
Conversion of strings to other types
Strings functions
Introduction to Pointers
Array & Pointers
Functions & Pointers
Array of Pointers
UNIT 5: Structures and Unions
Introduction to structures
Working with structures
Introduction to unions
Difference with structures and unions
Introduction to file handling
Opening and closing a data file
Creating a data file
I/O operations on files
1. P K Sinha, Computer Fundamentals, BPB
2. Balagurusamy, E programming in ANSI C 2/e, TMH
Reference
Books:
1.Complete Reference C, Herbert Schildt, BPB Publications.
2. A book on C, Era Pohl and Kelly, Pearson Education.
3. The C Programming Language, Second Edition by Brian W. Kernighan and Dennis M. Ritchie.
Basics of Computer & C Programming
Unit 1
LECTURE 1
The word Computer comes from
the word Compute, which to be a
calculating device, which can
perform arithmetic operation at
enormous speed.
Basics of Computer & C Programming
Characteristics of Computer: Automatic:-
A machine is said to be automatic, works by itself without
human intervention. Computers are automatic machine because once
started on a job, they carry on until the job is finished, normally without any
human assistance.
2.Speed: - A Computer is a very fast device. It can perform in a few
seconds. While taking about the speed of a computer.. We do not talk in
terms of seconds or even milliseconds (10-3). Our units of speed are the
microseconds (10-6), the nanoseconds (10-9), and even the picoseconds
(10-12).
3.Accuracy: - In addition to being very fast, computers are very accurate.
The accuracy of a computer is consistently high and the degree of accuracy
of a particular compute depends upon its design. However errors can occur
in a computer due to incorrect input data or incorrect code by the
programmer.
Basics of Computer & C Programming
Characteristics of Computer: 4.Diligence: - Unlike human beings, a computer is free from
tiredness and lack of concentration. It can continuously work for
hours without creating any error.
5.Versatility: - Versatility is one of the most wonderful things about
the computer. It is all-rounder and it can do different job.
6.Power of Remembering: - A computer can store and recall any
amount of information because of its secondary storage device.
7.No I.Q:- A computer is not a magical device. It possesses no
intelligence of its I.Q. is zero.
8.No feeling: - Computer are devoid of emotion. They have no
feeling and no intents. Because they are machine.
Basics of Computer & C Programming
The Computer Generation: Generation in computer talk in a step in technology. It
provides a framework for the growth of the computer
industry. Generation came into wide use only after 1964.
There are totally five computer generations known until
today.
Basics of Computer & C Programming
First Generation:-
( 1942-1955)
In this generation some of the early computer ENIAC
(Electronic Numeric Integrator and Calculator),
EDVAC (Electronic Discrete variable Automatic
Computer) EDSAC (Electronic Delay storage
Automatic Calculator) UNIVAC ( The Universal
Automatic Computer) IBM ( International Business
Machines) . These Machines and others of their time
were built by using thousands of vacuum tubes.
Basics of Computer & C Programming
10
The characteristic of Ist Generation:-
They were the fastest calculation devices of their time.
They were too bulky in size requiring large rooms for
installation.
Thousands of vacuum tubes which were used emitted
large amount of heat and burnt out frequently
Basics of Computer & C Programming
11
Second Generation ( 1955-1964):-
The second generation computer were manufactured using
transistors, instead of vacuum tubes. A new electronic
switching device called transistor was invented at Bell
Lab in 1947 by John Bardeen, Willian Shockley and
Walter Brattain. Transistor are more powerful, more
reliable less expensive, smaller and cooler to operator than
vacuum tube. On the software front the IInd generation.
Saw the emergence at high-level programming language
and batch O.S. High level programming languages like
FORTAN, COBOL, ALGOL and SNOBOL were
developed during IInd generation period.
Basics of Computer & C Programming
12
Characteristic features of IInd Generation:-
They were more than ten times faster than the first
generation computer.
They were much smaller than Ist generation
computers requiring smaller space.
Although the need dissipation was much less than Ist
generation the rooms/area in Which II nd generation
Computer were located had to be property a/c.
Basics of Computer & C Programming
13
IIIrd Generation (1964-1975):-
In 1958 Jack stoclair Kilby and Rober Noyce invented Ist
integrated circuit. Integrated circuits (IC) are consisting
of several electronic components like transistors, resistors,
and capacitors grown on a single chip of silicon. The IC
technology was also known as micro electronics
technology was also known as micro electronics
technology because it made it possible to integrate large
number of circuit components into very small (less than
5mm square) surface of silicon known as chip
Basics of Computer & C Programming
14
The characteristic features of IIIrd Generation:-
They were much more powerful than the IInd
generation Computers. They were capable of
performing about 1 million instruction per second.
They were much smaller than IInd generation
computer requiring smaller space.
Although the heat dissipation was much less than
second generation. Computer the rooms also required
AC.
Basics of Computer & C Programming
15
IVth Generatiion ( 1975-1989) :-
During the IVth generation magnetic core memories were
replace by semiconductor memories, resulting in large
random access memories with very fast access time on the
other hand hard disk became cheaper smaller, and larger in
capacity.
Basics of Computer & C Programming
16
The characteristic of IV th generation:-
The PC was smaller and cheaper than the mainframes
or minicomputers of III rd generation.
The mainframes were much more powerful than IIIrd
generation.
No AC was required for PC.
Basics of Computer & C Programming
17
Fifth generation ( 1989 Present ):-
During the 5th generation period there was tremendous out
growth of computer Networks communication
technologies became faster day to day and more
computers were networked together. The internet made of
possible for computer user sitting across the globe to
communicate with each other within minutes by the use of
e-mail.
Basics of Computer & C Programming
18
The characteristic features of Vth generation.
Portable PC are much more smaller and handy than the
PC of the IVth generation allowing user to use computing
facility even while traveling.
The desktop PCs and work station are several times, ore
powerful than the PCs of the IVth generation.
The mainframes are several times more powerful than the
mainframe systems of the IVth generation.
Basics of Computer & C Programming
19
Thanks
Basics of Computer & C Programming
20