Вы находитесь на странице: 1из 11

LECTURE NOTES

FOR
PROBLEM SOLVING
THROUGH
C
PREPARED BY
SERAVANA KUMAR P V M

B.Tech I Year I Sem


2014 - 15

CVR COLLEGE OF ENGINEERING


(AUTONOMOUS)
Vastunagar, Mangalpalli (V), Ibrahimpatan (M),
R. R. Dist. Pin : 501 510, E-mail : info@cvr.ac.in

Web : http://cvr.ac.in

SYLLABUS
(Common to all Branches)
Instruction
: 3 periods/week
End Examination : 75 Marks
Credits
:3
Duration
: 3 hours
Sessional marks : 25
UNIT - I
Introduction to Computers:
Hardware components: CPU, RAM, I/O Devices.
Software : Application software and System Software. Computer Languages. Simple problem
solving: Algorithms, Pseudo code, flow charts. Example problems- solving a quadratic equation,
finding sum of digits of a given number.
UNIT II
Introduction to C Language: Structure of C program. Compilation process.
Basic Programming constructs- Identifiers, Basic data types, Variables, Constants, I/O functions.
Operators- Expressions,
Precedence and Associativity, Expression Evaluation, Type
conversions, Bit-wise operators, Statements, Programming examples.
UNIT III
Selection Statements: if if-else, nested if, else-if ladder. Block of statements and scope.
switch statement. break and goto statements. Examples- student grade decision based on marks
obtained, simple calculator program.
Loop statements while, for, do-while statements, Loop examples.
Other statements related to looping break, continue, goto, Programming examplesfinding gcd of two numbers, finding factorial of given number, generating prime numbers etc.
UNIT - IV
Introduction to Structured Programming: Preprocessing phase Preprocessor directivessymbolic constants, macros, conditional compilation. Standard symbolic constants.
Functions Basics function header, function prototype specification, function definition and
function call. Actual, formal parameters and return statement. Examples-standard library
functions and simple user defined functions.
UNIT - V
Recursion:
recursion- recursive functions and tracing recursive calls. Examples factorial,
Fibonacci, Towers of Hanoi. Scope and extent of variables. Storage classes-automatic, register,
static and global.
UNIT -VI
Arrays: Concepts, arrays representation in C, passing array as argument to functions. Two
dimensional arrays-2D array organization in memory-row major and column major. Basics of
multidimensional arrays. Examples programs on Matrix operations.

UNIT - VII
Pointers: Introduction (Basic Concepts), Pointers as arguments to functions. Pointers to arrays,
pointer-to-pointer , array-of-pointers.
Dynamic memory allocation functions, programming applications.
UNIT - VIII
Strings: String representation , String Input / Output functions. String manipulation
function implementation. Command line arguments.
TEXT BOOKS :
1.
C Programming & Data Structures, B.A.Forouzan and R.F. Gilberg, Third
Edition, Cengage Learning.
2.
Problem Solving and Program Design in C, J.R. Hanly and E.B. Koffman, Fifth Edition,
Pearson education.
REFERENCES :
1. How to Solve it by Computer by R G Dromey
2. The C Programming Language, B.W. Kernighan and Dennis M.Ritchie, PHI/Pearson
Education
3. C Programming with problem solving, J.A. Jones & K. Harrow, dreamtech Press
4. Programming in C Stephen G. Kochan, III Edition, Pearson Eductaion.

PROBLEM SOLVING THROUGH C


Objectives of the course:
This course is a first C programming course which is common to all branches. C language
is the best choice to be the first language to learn with its structured constructs and terse syntax.
This language has become choice language for implementing system and application programs
alike.
The units are as follows
UNIT I
It introduces students to the concepts of computer science, as these concepts pertain to
computer programming. It deals with the concept of a computer system and how it relates to
computer hardware and software, the different environments of operation, the evolution of
computer language from the machine languages to high-level languages, creating and running
the programs/software, software development methodologies, the use of algorithms, flowcharts
and pseudo code in program creation and the importance of software development methods.
UNIT- II
It deals with the a,b,c,ds of C programming language such as keywords, datatypes, tokens,
identifiers, expressions, statements, selection statements. We start with simple programs.
UNIT- III
In this unit the student is asked to make extensive use of the branching and iterative
statements such as if, switch, while, for , do-while; and we get to know the importance of
keywords such as break, continue in selective and iterative statements.
UNIT IV
It introduces to the core of Structured Programming Language i.e functions. We deal with
the basics of a function such as Function Prototypes, function definitions, inter function
communication, user-defined and library functions or standard functions.

UNIT- V
In this unit, the special category of functions called recursive functions are used along
with their execution and analysis.
We get to know the importance of various storage classes available in C.
UNIT- VI
This unit introduces us to derived data type arrays, which is used for grouping
homogeneous data. It discusses the array applications, 2d arrays, multi-dimensional arrays.

UNIT VII
It deals with the derived data types pointers, which deals with data types in terms of their
addresses and strings which is a homogeneous grouping of primary data type character. It deals
with pointers for inter function communication, memory allocation functions, programming
applications, pointer to void, pointers to pointers, array of pointers.

UNIT VIII
It deals with string input/output functions, string manipulation function, string conversion,
array of strings. It introduces to a significant concept of command line arguments.

Course Outcomes:
After completion of this course, the students would be able to
CO 1: To be able to demonstrate the programming constructs offered by C language.
CO 2: To be able to design a problem solution using flowcharts/ Algorithms.
CO 3: To able to demonstrate the logical view of memory using pointers.
CO 4: To know the advantages of modular programming through functions.

LECTURE SCHEDULE
S.No.

Lecture
No.

Topics to be covered

Introduction to Computers, computer systems

Computing Environments, Computer Languages

creating and running programmes

4
5

4
5

Software Development Method


Creating and Running programs

applying the software development method

C Background, Simple C program

Identifiers, Basic Data types

Variables, Constants

10

10

Input/ Output operations

11

11

Operators

12

12

Operators

13

13

Expression evaluation

14

14

Type Conversions

15

15

Bit wise operators

16

16

Statements

17

17

Simple C programming examples

18

18

If Statements

19

19

Switch statements

20

20

Repetition Statements

21

21

Repetition Statements

22

22

Loop Examples

23

23

break, continue, goto

24

24

simple C programming examples

25

25

Function Basics

26

26

user-defined functions

27

27

inter function communication

28

28

inter function communication

29

29

standard functions

30

30

Storage classes auto, register, static

31

31

Storage classes extern, scope rules

32

32

type qualifiers

33

33

recursive functions

34

34

recursive functions

35

35

preprocessor commands

36

36

example c programs

37

37

Arrays concepts

38

38

using arrays in C

39

39

Inter function communication

40

40

array applications

41

41

2d arrays

42

42

multidimensional arrays

43

43

C programme examples

44

44

---------------do----------------

45

45

---------------do----------------

46

46

Pointers basics

47

47

pointer basics

48

48

Pointers for inter-function communication

49

49

---------------do-------------------

50

50

pointers to pointers

51

51

compatibility

52

52

memory allocation functions

53

53

array of pointers

54

54

programming applications

55

55

-------------------do----------------

56

56

---------------do--------------------

57

57

command line arguments

58

58

String concepts, I/O functions

59
60

59
60

array of strings, string manipulation functions


C programming examples

Program Outcomes(POs):
PO 1.
Capability to design the computer software and hardware with the acquired knowledge of
mathematics, probability & statistics, graph theory and logic.
PO 2.
Ability to analyze ,formulate and model problems using concepts of object oriented
analysis and design and implement using c#, c++ and Java.
PO 3.
Ability to appreciate advanced algorithms aimed at organizing, analyzing and interpreting
data coupled with computational intelligence.
PO 4.
Orientation towards research in niche areas like advanced architectures, mobile
computing and cloud computing and network security.
PO 5.
An ability to conduct experiments to investigate complex problems and create models for
solution.
PO 6.
Strong motivation towards creation and use of CASE tools opens source tools and
technologies and contribute towards its development.
PO 7.
Capability to manifest personal and team software process and ability to function across
multiple domains.
PO 8.
An understanding of professional, legal, and ethical issues and responsibilities as it
pertains to computer engineering.
PO 9.
An ability to apply knowledge of local and global changes, analyze its impact on societal,
legal and cultural issues related to the practice of computer science and information technology.
PO 10.
An understanding of the engineering and management principles required for project and
finance management and ability to carry out umbrella activities related to project management.
PO 11.
Ability to communicate technical information in speech, presentation, and, in writing.
PO 12.
Understanding the necessity, and, developing the ability to engage in lifelong learning.
Programme Educational Objectives(PEOs):
PEO 1
Graduates will acquire capability to apply their knowledge and skills to solve various
kinds of computational engineering problems.
PEO 2
Graduates will be in a position to recognize and incorporate societal needs and practise
their profession with high regard to legal and ethical practices.
PEO 3
Graduates will be ready to work in projects related to complex problems involving multi
disciplinary areas.

PEO 4
To evolve as resourceful engineers catering to global changes and engagein life-long
learning.
PEO 5
To enable the students with required soft skills, that can be used in a pragmatic manner
and excel in diverse environments in the competitive world.
Mapping of subject to PEOs:
Course Code

Course Name

PEO 1

PEO 2

PEO 3

PEO 4

PEO 5

IYR ISEM
Problem Solving through C

Mapping of subject to POs:


Name of Subject
Problem Solving through C

PO1
L

PO2
H

Po3
L

PO4
-

Po5
H

PO6
--

PO7
-

PO8
-

PO9
-

PO10
-

PO11
-

PO12
-

Вам также может понравиться