Computer
Programming in C
EG
1109 CT
Total: 8 hour /week
Year: I Lecture: 3 hours/week
Semester: I Tutorial:
2 hours/week
Practical: 3 hours/week Course Description:
This course deals with the computer fundamentals, problem
solving method. It covers basic input and output, structured programming
fundamentals, functions, arrays, strings, pointers, structures and file
handling using C programming language.
Course Objective:
After the completion of this course the students will be
able to:
1 Describe
basic programming concepts and terms.
2 Explain
and apply various data types and operators used in C.
3 Develop
the working knowledge of problem solving by using the computer methods, systems
and languages.
4 Apply
conditional and looping statements while developing programs.
5 Create
modular programs using function.
6 Make
and apply programs using array, strings, structure and union.
7 Apply
pointers in developing programs.
8 Operate
Read and write mode to data file in C.
Course Contents:
Units
|
Topics
|
Contents
|
Hours
|
Methods /Media
|
Marks
|
1
|
Computer Programming
Basics:
|
1.1 Program, Programming, Programming language and its types
1.2 Language translators ( Assembler,
Compiler, Interpreter)
1.3 Program Design Tools (Algorithm,
Flowchart and pseudo code)
|
3hrs
|
|
|
2
|
Introduction to C:
|
2.1 History
2.2 Character
Set, Tokens, Keywords,
Identifiers
2.3 Constants
and its types, Variables, Rules for naming Variables
2.4 Operators and its types
2.5 Expression
2.6 Data types
|
6hrs
|
|
|
Units
|
Topics
|
Contents
|
Hours
|
Methods /Media
|
Marks
|
|
|
2.7 Precedence and Associativity
2.8 Escape Sequence
|
|
|
|
3
|
Basic Input and Output:
|
3.1 Formatted
Input/ Output functions (scan (), print ())
3.2 Unformatted Input / Output functions
(getchar (), putchar (), gets (), puts())
|
3 hrs
|
|
|
4
|
Structured
Programming
Fundamentals:
|
4.1 Control Structure (Sequence, Selection, Loop)
4.2 Conditional Statements (if, if….else,
if….else if, nested if…else, switch)
4.3 Loop (for, while, do – while)
4.4 Nested loop
4.5 Break and continue
statement
|
10hrs
|
|
|
5
|
Functions:
|
5.1 Introduction
5.2 Function Components (Function Prototypes, Call and Definition)
5.3 Types of function on the basis of return type and arguments
5.4 Call by value and call by reference
5.5 Recursion
|
4 hrs
|
|
|
6
|
Arrays and Strings
|
6.1 Introduction to Array
6.2 Types of Array (One Dimensional, Multi Dimensional, Static)
6.3 Dynamic Array (Introduction only)
6.4 Passing Array to Function
6.5 Introduction to String
6.6 Handling Functions (strcpy(),
strlen(), strcmp(), strrev(), strlwr(), strupr())
|
8hrs
|
|
|
7
|
Pointer
|
7.1 Introduction to pointer
7.2 Pointer Arithmetic
7.3 Relation between pointer and Array
7.4 Dynamic Memory
Allocation
|
4hrs
|
|
|
8
|
Structure and Union
|
8.1 Introduction to Structure
8.2 Declaring and Defining Structures
8.3 Accessing Structure
member
|
4 hrs
|
|
|
Units
|
Topics
|
Contents
|
Hours
|
Methods /Media
|
Marks
|
|
|
8.4 Introduction to Nested Structure
8.5 Arrays of Structures
8.6 Union:
Declaring and defining Union, Accessing Union member
8.7 Difference between
Structure and Union
|
|
|
|
9
|
Files and Files
Handling in ‘C’:
|
9.1 Introduction to data file
9.2 Opening and closing sequential files
9.3 Modes of opening file (r, w, a)
9.4 Processing file
|
3 hrs
|
|
|
10
|
Practical
|
|
45 hrs
|
|
|
Perform the following tasks using C:
1.
Write programs to implement sequential
structure.
2.
Write programs to implement conditional and
iterative structure.
3.
Write programs using array and strings.
4.
Write programs using pointer.
5.
Write programs using structure and union.
6.
Write programs using functions.
7.
Write programs to read from and write to data
file.
|
|
|
|
Reference books:
• Kanetkar,
Y. P. (2008). Let us C 8th Ed, New Delhi, BPB Publication
• Baral,
D.S., Baral, D. & Ghimire S. K, The secretes of C programming language.
Kathmandu, Bhundi Purana Prakasan.
• Balagurusamy,
E. (2007). Programming in ANSI C. New Delhi, India: Tata McGraw-
Hill.
• Raman,
R. (1984). Computer programming in C, New Delhi, PHI. India
• B.S.
Gottfried(2001), Schaum’s Outline Series for Programming with C, Second
Edition, Tata McGraw Hill Publishing Company, New Delhi
• Bhatta,
R.D (2015), A Text Book of C Programming, Vidyarthi Prakashan
No comments:
Post a Comment