ANNAMACHARYA INSTITUTE OF TECHNOLOGY AND SCIENCES, TIRUPATI
(AUTONOMOUS)
Course Code Year &Sem L T P C
COMPUTER PROGRAMMING LAB
23AES0502 I-I 0 0 3 1.5
Course Outcomes:
After studying the course, student will be able to
CO1: Understand the basic syntax of C program to build applications.
CO2: Create the control structure for solving complex problems.
CO3: Apply the concepts of arrays, functions, basic concepts of pointers to organize the data.
CO4: Apply the concepts of structures, unions and linked list to manage heterogeneous data.
CO5: Create the file applications for storing and accessing data.
CO Action Verb Knowledge Condition Criteria Blooms
Statement level
the basic syntax of C to build
CO1 Understand L2
program applications
for solving
CO2 Create the control structure complex L6
problems
the concepts of
arrays, functions, to organize
CO3 Apply L3
basic concepts of the data
pointers
the concepts of to manage
CO4 Apply structures, unions heterogeneous L3
and linked list data
for storing
CO5 Create the file applications and accessing L6
data
List of Experiments:
Exercise 1: Problem-solving using Computers[CO1]
i) Basic Linux environment and its editors like Vi, Vim & Emacs etc.
ii) Exposure to Turbo C, gcc
iii) Writing simple programs using printf(), scanf()
Exercise 2: Problem-solving using Algorithms and Flow charts.[CO1]
i) Sum and average of 3 numbers
ii) Conversion of Fahrenheit to Celsius and vice versa
iii) Simple interest calculation
Exercise 3: Variable types and type conversions[CO2]
i) Finding the square root of a given number
ii) Finding compound interest
iii) Area of a triangle using heron’s formulae
iv) Distance travelled by an object
Exercise 4: Operators and the precedence and as associativity[CO2]
i) Evaluate the following expressions.
a. A+B*C+(D*E) + F*G
b. A/B*C-B+A*D/3
c. A+++B---A
d. J= (i++) + (++i)
ii) Find the maximum of three numbers using conditional operator
iii) Take marks of 5 subjects in integers, and find the total, average in float
list and perform insertion, deletion, and traversal.
Exercise 5: Branching and logical expressions[CO2]
i) Write a C program to find the max and min of four numbers using if-else.
ii) Write a C program to generate electricity bill.
iii) Find the roots of the quadratic equation.
iv) Write a C program to simulate a calculator using switch case.
v) Write a C program to find the given year is a leap year or not.
Exercise 6: Loops, while and for loops[CO2]
i) Find the factorial of given number using any loop.
ii) Find the given number is a prime or not.
iii) Compute sine and cos series
iv) Checking a number palindrome
v) Construct a pyramid of numbers.
Exercise 7: 1 D Arrays: searching[CO3]
i) Find the min and max of a 1-D integer array.
ii) Perform linear search on1D array.
iii) The reverse of a 1D integer array
iv) Find 2’s complement of the given binary number.
v) Eliminate duplicate elements in an array.
Exercise 8: 2 D arrays, sorting and Strings[CO3]
i) Addition of two matrices
ii) Multiplication two matrices
iii) Sort array elements using bubble sort
iv) Concatenate two strings without built-in functions
v) Reverse a string using built-in and without built-in string functions
Exercise 9: Pointers, structures and dynamic memory allocation[CO3]
i) Write a C program to find the sum of a 1D array using malloc()
ii) Write a C program to find the total, average of n students using structures
iii) Enter n students data using calloc() and display failed students list
iv) Read student name and marks from the command line and display the student details along
with the total.
v) Write a C program to implement realloc()
Exercise 10:Bitfields, Self-Referential Structures, Linked lists[CO4]
i) Create and display a singly linked list using self-referential structure.
ii) Demonstrate the differences between structures and unions using a C program.
iii) Write a C program to shift/rotate using bitfields.
iv) Write a C program to copy one structure variable to another structure of the same type.
Exercise 11:Functions, call by value, scope and extent[CO2]
i) Write a C function to calculate NCR value.
ii) Write a C function to find the length of a string.
iii) Write a C function to transpose of a matrix.
iv) Write a C function to demonstrate numerical integration of differential equations using Euler’s
method
Exercise 12:Recursion, the structure of recursive calls[CO4]
i) Write a recursive function to generate Fibonacci series.
ii) Write a recursive function to find the lcm of two numbers.
iii) Write a recursive function to find the factorial of a number.
iv) Write a C Program to implement Ackermann function using recursion.
v) Write a recursive function to find the sum of series.
Exercise 13: Call by reference, dangling pointers[CO4]
i) Write a C program to swap two numbers using call by reference.
ii) Demonstrate Dangling pointer problem using a C program.
iii) Write a C program to copy one string into another using pointer.
v) Write a C program to find no of lowercase, uppercase, digits and other characters using pointers.
Exercise 14: File handling[CO5]
i) Write a C program to write and read text into a file.
ii) Write a C program to write and read text into a binary file using fread() and fwrite()
iii) Copy the contents of one file to another file.
iv) Write a C program to merge two files into the third file using command-line arguments.
v) Find no. of lines, words and characters in a file
vi) Write a C program to print last n characters of a given file.
Textbooks:
1. 1. Ajay Mittal, Programming in C: A practical approach, Pearson.
2. Byron Gottfried, Schaum ' s Outline of Programming with C, McGraw Hill
Reference Books:
1. 1 Brian W. Kernighan and Dennis M. Ritchie, The C Programming Language, Prentice- Hall of India
2. C Programming, A Problem-Solving Approach, Forouzan, Gilberg, Prasad, CENGAGE
Mapping of course outcomes with program outcomes
CO PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PSO1 PSO2
CO1 2 3 2 2 2
CO2 3 3 3 2 2
CO3 3 3 2 3 3 2
CO4 3 3 3 2 2 2
CO5 3 3 3 3 3 2
Correlation matrix
Program PO(s) : Action Verb and Level of
Unit No. Co’s Action verb BTL
Outcome (PO) BTL (for PO1 to PO12) Correlation (0-3)
PO1 PO1: Apply(L3) 2
PO2 PO2: Review(L2) 3
1 CO1: understand L2
PO3 PO3: Develop(L3) 2
PO4 PO4: Analyze(L4) 2
PO1 PO1: Apply(L3) 3
PO2 PO2: Review (L3) 3
2 CO2: Create L6 PO4 PO4: Analyze (L4) 3
PO5 PO5: Apply(L3) 3
PO12 PO12: Thumb rule 2
PO1 PO1: Apply(L3) 3
PO2 PO2: Review (L3) 3
3 CO3: Apply L3 PO4 PO4: Analyze (L4) 2
PO5 PO5: Apply(L3) 3
PO12 PO12: Thumb rule 3
PO1 PO1: Apply(L3) 3
PO2 PO2: Review (L2) 3
4 CO4: Apply L3 PO3 PO3: Develop(L3) 3
PO4 PO4: Analyze (L4) 2
PO12 PO12: Thumb rule 2
PO1 PO1: Apply(L3) 3
PO2 PO2: Review(L2) 3
5 CO5: Create L6 PO3 PO3: Develop(L3) 3
PO4 PO4: Analyze (L4) 3
PO12 PO12: Thumb rule 3
Justification Statements:
CO1: Understand the basic syntax of C program to build applications.
Action Verb: Understand (L2)
PO1 Verb: Apply (L3)
CO1 Action verb is less than PO1 verb by one level. Therefore, the correlation is moderate (2)
PO2 Verb: Review (L2)
CO1 Action verb is greater than PO2 verb. Therefore, the correlation is high (3)
PO3: Develop (L3)
CO1 Action verb is less than PO3 verb by one level. Therefore, the correlation is moderate (2)
PO4: Analyze (L4)
CO1 Action verb is less than PO1 verb by one level. Therefore, the correlation is moderate is (2)
CO2: Create the control structure for solving complex problems.
Action Verb: Create (L6)
PO1: Apply (L3)
CO2 Action verb is greater than as PO1 verb. Therefore, the correlation is high (3)
PO2: Review (L3)
CO2 Action verb is same level PO2 verb. Therefore, the correlation is high (3)
PO4: Analyze (L4)
CO2 Action verb is same as PO4 verb. Therefore, the correlation is high (3)
PO5: Apply(L3)
CO2 Action verb is same as PO5 verb. Therefore, the correlation is high (3)
PO12: Thumb rule
For some of Linear Data Structure applications, Linked lists concepts are used to write programs store
the data. Therefore, the correlation is high (2)
CO3: Apply the concepts of arrays, functions, basic concepts of pointers to organize the data..
Action Verb: Apply (L3)
PO1: Apply (L3)
CO3 Action verb is greater than as PO1 verb. Therefore, the correlation is high (3)
PO2: Review (L3)
CO3 Action verb is same level PO2 verb. Therefore, the correlation is high (3)
PO4: Analyze (L4)
CO3 Action verb is less than PO4 verb by one level. Therefore, the correlation is moderate (2)
PO5: Apply (L3)
CO3 Action verb is same as PO5 verb. Therefore, the correlation is high (3)
PO12: Thumb rule
For some of Linear Data Structure applications, Linked lists concepts are used to write programs store
the data. Therefore, the correlation is high (3)
CO4: Apply the concepts of structures, unions and linked list to manage heterogeneous data.
Action Verb: Apply (L3)
PO1: Apply (L3)
CO4 Action verb is greater than as PO1 verb. Therefore, the correlation is high (3)
PO2: Review (L3)
CO4 Action verb is same level PO2 verb. Therefore, the correlation is high (3)
PO4: Analyze (L4)
CO4 Action verb is less than PO4 verb by one level. Therefore, the correlation is moderate (2)
PO5: Apply(L3)
CO4 Action verb is same as PO5 verb. Therefore, the correlation is high (3)
PO12: Thumb rule
For some of Linear Data Structure applications, Linked lists concepts are used to write programs store
the data. Therefore, the correlation is high (2)
CO5: Create the file applications for storing and accessing data.
Action Verb: Create (L6)
PO1: Apply (L3)
CO5 Action verb is greater than as PO1 verb. Therefore, the correlation is high (3)
PO2: Review (L3)
CO5 Action verb is same level PO2 verb. Therefore, the correlation is high (3)
PO4: Analyze (L4)
CO5 Action verb is same as PO4 verb. Therefore, the correlation is high (3)
PO5: Apply(L3)
CO5 Action verb is same as PO5 verb. Therefore, the correlation is high (3)
PO12: Thumb rule
For some of Linear Data Structure applications, Linked lists concepts are used to write programs store
the data. Therefore, the correlation is high (3)