Cs 205 Prog in C Syl

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

CS – 205 - PROGRAMMING IN C

CS-205
Course Title Programming in C Course Code
Semester II Course Group Core
Teaching Scheme in
4:1:0 Credits 3
Periods (L:T:P)
Total Contact
Methodology Lecture +Tutorial 75
Periods
CIE 60 Marks SEE 40 Marks

Prerequisites
Knowledge of basic mathematics and IT skills.
Course Outcome
Upon completion of the course the students shall be able to:

Course Outcome

CO1 Write Algorithms and draw flow charts for given problems

CO2 Use data types and classify operators

Develop programs using Decision making and looping


CO3
statements

CO4 Create arrays and know usage of strings

CO5 Develop programs using different types of functions

CO6 Develop programs using Structures and Files

COURSE CONTENTS:

1. Programming Methodology and Introduction to C Language


Duration: 10 Periods

Steps involved in problem solving - Define Algorithm - Characteristics of algorithm - Steps


involved in algorithm development - Algorithms for simple problems - Define flowchart - Symbols
used in flowchart - Flowcharts for simple problems - Differentiate algorithm and flowchart - Define
Program - Differentiate between algorithm and program - Define High level language and low level
language- Define Compiler, Assembler, Linker and Loader - Define source code, assembly code,
object code, machine code - importance of C language –- structure of C program – different stages
in converting the C program source code into an executable code - steps in executing the C
program.
2. Understand Constants, Variables and Data Types in C and Understand Operators and
Expressions in C
Duration: 10 Periods
Character set - C Tokens - Keywords and Identifiers- Constants and Variables - data types and classification
- declaration of a variable - Assigning values to variables - Define operator -Classify operators - List and
explain various arithmetic operators with examples -Illustrate the concept of relational operators - List
logical operators - various assignment operators - Increment and decrement operators - List bitwise
operators - Conditional operator - List various special operators - precedence and associatively of operators -
Define expression - Evaluation of Arithmetic expressions - Evaluation of Logical expressions - Evaluation of
Relational expressions - type conversion techniques – Know Preprocessor directives – Know Header Files -
Reading and writing characters - formatted input and output.

3. Decision making and Looping statements


Duration: 14 Periods

Decision making in C programming - simple if statement – if-else statement – nested if statement -


else-if ladder – break and continue statements - Switch statement - Classification of various loop
statements- while loop – do-while loop - for loop - nesting of loops- Comparisons of different loop
statements - Infinite loop and steps to avoid it.
4. Arrays and Strings
Duration: 14 Periods

Arrays – definition, declaration and initialization of One Dimensional -Array -Accessing the
elements in the Array - ‘accessing array out of bounds’ problem - Reordering an array in ascending
order – average of elements in an array – largest element in an array - Declaration and initialization
of two Dimensional Arrays - sample programs on matrix addition and matrix multiplication,
transpose- Strings – Definition, Declaration and initialization of String variables - Reading of
strings from terminal - writing strings to screen - String handling functions with sample programs

5. User defined functions


Duration: 13 Periods

Function – Definition - Need for user defined functions - Advantages of functions - elements of
function - Return values and their types - function prototype - function call - function definition –
Scope, visibility and lifetime of variables in functions- Local and External variables -Global
variable-Functions with no arguments and no return values - functions with arguments with no
return values - functions with arguments with return values - functions with no arguments with
return values - Recursion - sample programs on recursion - passing arrays to functions .
6. Structures and Unions and File Management
Duration: 14 Periods

Structures and Unions Structure- Definition - Creating a structure - Declaring structure variables -
Accessing the structure members - Concept of structure assignment - Find size of a structure -
Nested structure - Structure as function arguments - Array of structures - Structure containing arrays
- array of structures containing arrays - Union and illustrate usage of a union – difference between
Structures and Union.
Files management File – Definition - Declare file pointer to a file - file opening modes - Concept of
closing of a file - Input / Output operations on a file - Random access to files.

REFERENCE BOOKS
1. Let Us C -- Yeshwanth Kanetkar BPB Publications
2. Programming in ANSI C -- E. Balaguruswamy Tata McGrawHill
3. Programming with C -- Gottfried Schaum’outline
4. C The complete Reference -- Schildt Tata McGraw Hill

Specific Learning Outcomes:

Upon completion of the course the student shall be able to


1.0 Programming Methodology and Introduction to C Language
1.1. State different steps involved in problem solving
1.2. Define algorithm and know its characteristics
1.3. State the steps involved in algorithm development
1.4. Develop algorithms for simple problems.
1.5. Define flowchart and know symbols used in drawing flowcharts
1.6. Draw flowchart for simple problems.
1.7. Differentiate algorithm and flowchart
1.8. Define program and differentiate between program and algorithm
1.9. Define High level language and low level language
1.10. Define Compiler, Assembler, Linker and Loader
1.11. Define source code, assembly code, object code, machine code.
1.12. state the importance of C language
1.13. Explain the structure of C program
1.14. List and Explain different stages in converting the C program source code to executable code.
1.15. Explain the steps involved in executing the C program
2.0 Constants, Variables , Data Types in C and Operators and Expressions and Input , Output
functions in C

2.1 Describe character set, C Tokens-Keywords, Variables, Identifiers, Constants and Variables.
2.2 Define Data type. Classify data types and explain with examples
2.3 Explain declaration of a variable and assigning values to variables
2.4 Define operator.
2.5 Classify and Explain operators with examples
2.6 Describe precedence and associativity of operators
2.7 Define expression
2.8 Describe evaluation of Arithmetic, Relational and logical expressions
2.9 Illustrate type conversion techniques.
2.10 Define and List Pre-processor directives
2.11 Discuss #include and #define Pre-processor directives.
2.12 Define Header file and discuss stdio.h, conio.h, math.h, string.h Header files.
2.13 Illustrate getchar(),putchar(),scanf(),printf() with programs.

3.0 Decision making , Looping statements


3.1 Discuss decision making in programming and
3.2 Explain decision making statements- if , if-else, nested if, else-if ladder - with syntax and
programs
3.3 Discuss break and continue statements.
3.4 Explain decision making statement- switch statement - with syntax and programs
3.5 Define looping and list loop statements
3.6 Explain the loop statements – while, do- while, for statement- with syntax and programs
3.7 Define nesting of loops and implement it
3.8 Compare different loop statements
3.9 Know about Infinite loop and steps to avoid it
4.0 Arrays and Strings
4.1 Define Array. Describe declaration and initialization of One Dimensional Array with syntax and
program
4.2 Explain about ‘accessing array out of bounds’ problem
4.3 Explain reading elements of an array, accessing the elements and display them with program
4.4 Explain sorting elements in an array in ascending order
4.5 Explain finding the average of elements in an array and finding the largest element in an array
4.6 Explain declaration and initialization of two Dimensional Arrays
4.7 Illustrate the concept of two dimensional arrays with sample programs on matrix addition,
subtraction, matrix multiplication and transpose of a matrix
4.8 Define String and know about declaration and initialization of a String variable.
4.9 Know about reading & writing of strings with programs
4.10 Explain about various String handling functions with sample programs.
5.0 User defined functions and Applications
5.1 Define function, state the need for user defined functions, advantages of functions
5.2 Know the elements of function and return values.
5.3 Define and discuss function prototype, function call, and function definition with syntax
and program.
5.4 Discuss the scope, visibility and lifetime of variables in functions
5.5 Differentiate Local and Global variables
5.6 Illustrate functions with no arguments and no return values with programs
5.7 Illustrate functions with no arguments and with return values with programs
5.8 Illustrate functions with arguments and with no return values with programs
5.9 Illustrate functions with arguments and with return values with programs
5.10 Illustrate passing arrays to functions with programs
5.11 Define recursion and Illustrate recursion with programs
6.0 Structures and Unions and File Management
Structures and Unions

6.1 Define structure


6.2 Illustrate creating a structure tag and declaring structure variables,
6.3 Explain accessing structure members and structure assignment
6.4 Know size of a structure.
6.5 Discuss nested structure concept.
6.6 Illustrate array of structures, structures containing arrays, arrays of structures containing
arrays.
6.7 Illustrate structure as function arguments and returning of structure variables as
function values.
6.8 Define Union and illustrate usage of a union.
6.9 Know the differences between Structure and Union

Files management

6.10 Define file


6.11 Know how to declare file pointer to a file
6.12 Illustrate the concept of file opening in various modes
6.13 Illustrate the concept of closing of a file
6.14 Illustrate the concept of Input / Output operations on a file
6.15 Illustrate the concept of random access to files

Suggested Student Activities:

Student activity like mini-project, surveys, quizzes, etc. should be done in group of 5-10students.
1. Each group should do any one of the following type of activity or any other similar activity related to
the course with prior approval from the course coordinator and programme coordinator concerned.
2. Each group should conduct different activity and no repetition should occur.
3. Explore and analyse topics to improve the level of creativity and analytical skill by taking Quiz/
tests/ assignments. Documents have to be maintained as a record.
4. Create a power point presentation on the topic relevant to course or advanced topic as an extension
to the course to improve the communication skills. Documents have to be maintained as a record.
5. Visit different sites relevant to topics. Listen to the lectures and submit a handwritten report
6. Coding competitions

Suggested E-learning links:

1. http://www.tutorialspoint.com/cprogramming/
2. http://www.indiabix.com/online-test/c-programming-test/
3. https://www.w3schools.in/c-tutorial/
4. https://nptel.ac.in/courses/106/104/106104128/
5. https://onlinecourses.nptel.ac.in/noc19_cs42/preview

CO-PO Mapping Matrix:

Linked Teaching
Course Outcome CL
PO Hours

Write Algorithms and draw flow charts for given


CO1 R, U, A 1,2,3,4,7 10
problems

CO2 Use data types and classify operators R, U, A 1,2,3,4,7 10

Develop programs using Decision making and


CO3 U, A 1,2,3,4,7 14
looping statements

CO4 Create arrays and know usage of strings U, A 1,2,3,4,7 14

Develop programs using different types of


CO5 U, A 1,2,3,4,7 13
functions

CO6 Develop programs using Structures and Files R, U, A 1,2,3,4,7 14

Total Sessions 75
MID SEM – I Exam

S.No Unit Name R U A Remarks

5(a) 7(a)
1 Unit-I 1, 2
5(b) 7(b)
6(a) 8(a)
2 Unit-II 3, 4
6(b) 8(b)
Total Questions 4 4 4
MID SEM – II Exam

S.No Unit Name R U A Remarks

5(a) 7(a)
1 Unit-I 1, 2
5(b) 7(b)
6(a) 8(a)
2 Unit-II 3, 4
6(b) 8(b)
Total Questions 4 4 4
Semester End Examination

S.No Unit Name R U A Remarks

1 Unit-I
1 9(a) 13(a)
2 Unit-II
3 Unit-III
2 10(a) 14(a)
4 Unit-IV
4 9(b) 13(b)
5 Unit-V 5,6 11(a) 15(a)
11(b) 15(b)
3
10(b) 14(b)
6 Unit-VI 7,8 11(a) 16(a)
11(b) 16(b)
Total Questions 8 8 8

Remembering (R) 1 Mark


Legend: Understanding (U) 3 Marks
Application (A) 5 Marks
MODEL QUESTION PAPER
BOARD DIPLOMA MID-SEM-1 EXAMINATION (C-21)
CS-205– PROGRAMMING IN C

TIME: 1 HOUR MAXIMUM MARKS:


20
PART-A MARKS: 4 X1=4

NOTE: 1. Answer all questions.


2. Each question carries one mark.

1. List any two differences between algorithm and flowchart.


2. Define Low level language
3. List various types of constants.
4. Define an expression.

PART-B MARKS: 2 X 3=6

NOTE: 1. Answer any one question from 5 and 6.


2. Each question carries three marks.

5.a)Write any three differences between algorithm and flowchart


(OR)
b)Write any three differences between high level language and low level language
6.a)How to declare variable in C ? Give examples.
(OR)
b)Evaluate an expression (2+5)*(10-4)%10.

PART-C MARKS: 2 X 5=10

NOTE: 1. Answer any one question from 7 and 8.


2. Each question carries five marks.

7. a)Draw a flowchart to find factorial of given number N.


(OR)
b) Draw a flowchart to find biggest of three numbers.
8. a)Explain different data types in C with examples.
(OR)
b)Explain operators in C with examples.
MODEL QUESTION PAPER
BOARD DIPLOMA MID-SEM-2 EXAMINATION (C-21)
CS-205– PROGRAMMING IN C

TIME: 1 HOUR MAXIMUM MARKS: 20


PART-A MARKS: 4
X1=4

NOTE: 1. Answer all questions.


2. Each question carries one mark.
1. Give the syntax of if statement in C.
2. Give the syntax of while statement in C.
3. Define an array.
4. Give the syntax for declaring and initializing of one dimensional array.

PART-B MARKS: 2 X3=6

NOTE: 1. Answer any one question from 5 and 6.


2. Each question carries three marks.

5. a)Write any three differences between break and continue statements.


(OR)
5. b) Write any three differences between while and do-while statements.
6. a)Write a C program to find largest number in array.
(OR)

6. b)Explain any three String handling functions .

PART-C MARKS: 2 X
5=10

NOTE: 1. Answer any one question from 7 and 8.


2. Each question carries five marks.
7. a) Explain do-while statement with syntax and sample program
(OR)

7. b) Explain switch statement with syntax and sample program .


8. a)Write a C program to find the multiplication of two matrices.
(OR)
8. b) Write a C program to find the addition of two matrices.
MODEL QUESTION PAPER
BOARD DIPLOMA END SEMESTER EXAMINATION (C-21)
CS-205– PROGRAMMING IN C
TIME: 2 HOURS MAXIMUM MARKS: 40
PART-A MARKS: 8 X 1=8
NOTE: 1. Answer all questions.
2. Each question carries one mark.
1. List any two differences between algorithm and flowchart..
2. Give the syntax of if statement in C.
3. List any two advantages of functions.
4. Give the syntax for declaring and initializing of one dimensional array.
5. Define function.
6. Define recursion.
7. What is a structure?
8. What is a file? PART-B
NOTE: 1. Answer any one question from 9, 10, 11 and 12. MARKS: 4 X 3=12
2. Each question carries three marks.

9. a) Write any three differences between algorithm and flowchart.


(OR)
9. b)Write a C program to find factorial of a number using recursion.
10. a) Write any three differences between break and continue statements.
(OR)

10. b) Write any three differences between structure and union statements.
11. a) Explain elements of function in C.
(OR)

11. b) Write any three differences between local variable and global variable statements.
12. a)Explain various modes to open a file.
(OR)
12. b) Explain how to access structure members.
PART-C

NOTE: 1. Answer any one question from 13, 14, 15 and 16 MARKS: 4 X 5=20
2. Each question carries five marks.
13. a) Draw a flowchart to find biggest of three numbers.
(OR)

13. b)Write a C program to illustrate functions without arguments and without return values.
14. a) Write a C program to find the multiplication of two matrices.
(OR)

14. b) Explain random handling functions.


15. a) Write a C program to illustrate functions with arguments and without return values.
(OR)

15. b) Write a C program to illustrate functions with arguments and with return values.
16. a) Write a C program to implement nested structures.
(OR)
16. b) Write a C program to implement array of structures.

You might also like