PSC Lecture Notes
PSC Lecture Notes
PSC Lecture Notes
FOR
PROBLEM SOLVING
THROUGH
C
PREPARED BY
SERAVANA KUMAR P V M
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.
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
4
5
4
5
Variables, Constants
10
10
11
11
Operators
12
12
Operators
13
13
Expression evaluation
14
14
Type Conversions
15
15
16
16
Statements
17
17
18
18
If Statements
19
19
Switch statements
20
20
Repetition Statements
21
21
Repetition Statements
22
22
Loop Examples
23
23
24
24
25
25
Function Basics
26
26
user-defined functions
27
27
28
28
29
29
standard functions
30
30
31
31
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
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
49
49
---------------do-------------------
50
50
pointers to pointers
51
51
compatibility
52
52
53
53
array of pointers
54
54
programming applications
55
55
-------------------do----------------
56
56
---------------do--------------------
57
57
58
58
59
60
59
60
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
PO1
L
PO2
H
Po3
L
PO4
-
Po5
H
PO6
--
PO7
-
PO8
-
PO9
-
PO10
-
PO11
-
PO12
-