SEMESTER I
CORE THEORY PAPER -1
PROGRAMMING IN C (CCS11)
UNIT
– I
Overview of C: History – Importance – Sample Programs – Basic
Structure – Programming Style – Executing – Unix System – MS-DOS System -
Constants, Variables, and Data Types: Character Set – C Token – Keyword and
Identifiers – Constants – Variables – Data Types – Declaration of Storage Class
– Assigning Values to Variables – Defining Symbolic Constants – Declaration –
Overflow and Underflow of Data - Operators and Expressions: Arithmetic,
Relational, Logical, Assignment, Increment and Decrement, Conditional, Bitwise,
Special Operators – Arithmetic Expressions, Evaluation of Expressions – Precedence
of Arithmetic Operators – Some Computational Problems – Type Conversions in Expressions
– Operator Precedence and Associativity – Mathematical Functions .
UNIT
– II
Managing Input and Output Operations: Reading, Writing a Character –
Formatted Input, Output - Decision Making and Branching: Decision Making with
If statement – Simple If Statement – The If…Else Statement – Nesting of If…Else
Statements – The Else If Ladder –The Switch Statement- The ?: Operator – The
Goto Statement - Decision Making and Looping: The while Statement – The do
Statement – The for Statement – Jumps in Loops – Concise Test Expressions.
UNIT
– III
Arrays: One-Dimensional Arrays - Declaration, Initialization of
One-Dimensional Arrays – Two-Dimensional Arrays - Initializing Two-Dimensional
Arrays – Multi-Dimensional Arrays –
Dynamic Arrays - Character Arrays and Strings: Declaring and Initializing
String Variables – Reading Strings from
Terminal – Writing Strings to Screen – Arithmetic Operations on Characters –
Putting String Together – Comparison of Two Strings –String Handling Functions
– Table of Strings – Other Features of Strings
User Defined Functions: Need for User-Defined Functions – A
Multi-Function Program – Elements of User-Defined Functions – Definition of
Functions – Return Values and Their Types – Function Calls –Function
Declaration – Category of Functions – No Arguments and No Return Values –Arguments
but no return values – Arguments with Return Values – No Arguments but Returns
a value – Functions that Return Multiple Values – Nesting of Functions –
Recursion – Passing Arrays, Strings to Functions – The Scope, Visibility and
Lifetime of Variables –Multi file Programs.
UNIT
– IV
Structure and Unions: Defining a Structure – Declaring Structure
Variables – Accessing Structure Members – Structure Initialization and Copying
and Comparing Structure Variable – Operations on Individual Members – Arrays of
Structures – Arrays within Structures – Structures within Structures –
Structures and Functions – Unions – Size of Structures – Bit Fields Pointers: Understanding Pointers –
Accessing the Address of Variable – Declaring, Initialization of Pointer Variables –
Accessing a Variable through its pointer – Chain of Pointers – Pointer Expression – Pointer
Increments and Scale Factor – Pointers and Arrays – Pointers and Character
Strings – Array of Pointers – Pointers as Function Arguments – Functions
Returning Pointers – Pointers to Functions – Pointers and Structures –Troubles with
Pointers File Management in C: Defining and Opening a File – Closing a File – Input/Output
Operations on File – Error Handling During I/O Operations – Random Access to
Files – Command Line Arguments.
UNIT
– V
Fundamental Algorithms: Exchanging the values of Two Variables-
Counting- Summation of a Set of Numbers-Factorial Computation -Sine Function
Computation –Generation of the Fibonacci Sequence-Reversing the Digits of an
Integer- Base Conversion – Character to Number Conversion - Factoring Methods:
Finding the square Root of a Number –The Smallest Divisor of an Integer-The
Greatest Common Divisor of the two integers-Generating Prime Numbers- Computing
the Prime Factors of an integer –Generation of Pseudo-random
Numbers-Raising a Number to a Large Power-Computing the nth
Fibonacci Number
TEXT
BOOK:
1.
Programming in ANSI C, E. Balagurusamy, Tata McGrawhill Education, 6th
Edition,
2013. ( Unit I to IV )
2.
How to Solve it by Computer, R.G.Dromey, PHI International ( Unit V )
REFERENCE
BOOKS:
1.
The C Programming Language (ANSI C), Kernighan, B.W. and Ritchie, D.M., PHI.
2. C
by Discovery , Foster & Foster , Penram International Publishers, Mumbai