Professional Documents
Culture Documents
Course Code Course Title Course Planner Lectures Tutorials Practicals Credits
CSE104 COMPUTER PROGRAMMING LABORATORY 11266::Janpreet Singh 0.0 0.0 2.0 1.0
Course Orientation 3 :SOFTWARE SKILL, 5 :PLACEMENT EXAMINATION, 6 :PLACEMENT EXAMINATION(Mass Recruiters), 7 :COMPETITIVE
EXAMINATION(Higer Education)
TextBooks
Sr No Title Author Edition Year Publisher Name
T-1 PROGRAMMING IN C ASHOK N. KAMTHANE 2nd 2011 PEARSON
Reference Books
Sr No Title Author Edition Year Publisher Name
R-1 PROGRAMMING WITH C BYRON GOTTFRIED 3rd 2011 MCGRAW HILL EDUCATION
R-2 PROGRAMMING IN ANSI C E. BALAGURUSAMY 6th 2012 MCGRAW HILL EDUCATION
Other Reading
Relevant Websites
Sr No Web address (only if relevant to the course) Salient Features
RW-1 http://www.c-lang.thiyagaraaj.com/tutorials/c-controls/c-data-input-and-data-output C Data Input and Data Output
Software/Equipments/Databases
Total :- 10 30
*Each experiment of the lab will be evaluated using following relative scheme:
Component % of Marks
J/E 50
VIVA 50
Practical 5 Formatted and unformatted Write a program which is capable of finding Students will learn about the use of Dev-Cpp
Input/Output functions, User defined the gcd of a number using a recursive recursive functions.
functions, Recursive functions(writing function.
C programs using user defined Write a program which is capable of finding
functions, library functions in math.h, the number is palindrome or not using a
recursive functions) recursive function.
Write a program which is capable of finding
the number is prime or not using a recursive
function.
Write a program which is capable of finding
the sum of digits of a number using a
recursive function.
Practical 6 One dimensional and two dimensional Write a program which is capable of Students will learn about the operations of Dev-Cpp
arrays(writing C programs using 1D, searching an element into set of elements. arrays(set of elements).
2D arrays) Write a program which is capable of finding
the average of elements using set of
elements.
Write a program which is capable of finding
maximum-value and minimum-value
element into set of elements.
Write a program which is capable of finding
the sum of 2-D matrices.
Write a program which is capable of finding
the sum of diagonal elements of 2-D
matrices.
Write a program which is capable of finding
the multiplication of 2-D matrices.
P6 is also reserved for second practical
evaluation.
Practical 6 One dimensional and two dimensional Write a program which is capable of Students will learn about the operations of Dev-Cpp
arrays(operations on arrays) searching an element into set of elements. arrays(set of elements).
Write a program which is capable of finding
the average of elements using set of
elements.
Write a program which is capable of finding
maximum-value and minimum-value
element into set of elements.
Write a program which is capable of finding
the sum of 2-D matrices.
Write a program which is capable of finding
the sum of diagonal elements of 2-D
matrices.
Write a program which is capable of finding
the multiplication of 2-D matrices.
P6 is also reserved for second practical
evaluation.
One dimensional and two dimensional Write a program which is capable of Students will learn about the operations of Dev-Cpp
arrays(C programming exercises searching an element into set of elements. arrays(set of elements).
involving assigning of values and Write a program which is capable of finding
manipulation of integer, float and the average of elements using set of
character arrays) elements.
Write a program which is capable of finding
maximum-value and minimum-value
element into set of elements.
Write a program which is capable of finding
the sum of 2-D matrices.
Write a program which is capable of finding
the sum of diagonal elements of 2-D
matrices.
Write a program which is capable of finding
the multiplication of 2-D matrices.
P6 is also reserved for second practical
evaluation.
Practical 7 One dimensional and two dimensional Write a program which is capable of pass Students will learn about the sorting Dev-Cpp
arrays(passing arrays to functions) the array as argument of user defined operations of array elements.
function.
Write a program which is capable of sort
the array elements in the ascending or
descending order with the use of bubble
sort.
One dimensional and two dimensional Write a program which is capable of pass Students will learn about the sorting Dev-Cpp
arrays(sorting of arrays using bubble the array as argument of user defined operations of array elements.
sort) function.
Write a program which is capable of sort
the array elements in the ascending or
descending order with the use of bubble
sort.
Practical 8 String, String functions, Sorting and Write a C program to find the length of Students will learn about the usage of Dev-Cpp
searching in string(writing C programs string without using library function. basic operations with strings.
on strings, array of strings, library Write a C program to combine 2 strings into
functions in string.h) single string without using library function.
Write a C program which contains a
function which behaves like the strcmp
function and is capable of determining if
two strings are equal or not.
Write a C program to sort an array of
strings alphabetically.
Write a C program to search any character
into string.
Write a C program to count vowels and
consonants of a sentence.
String, String functions, Sorting and Write a C program to find the length of Students will learn about the usage of Dev-Cpp
searching in string(writing C programs string without using library function. basic operations with strings.
to check whether a string is a Write a C program to combine 2 strings into
palindrome or not) single string without using library function.
Write a C program which contains a
function which behaves like the strcmp
function and is capable of determining if
two strings are equal or not.
Write a C program to sort an array of
strings alphabetically.
Write a C program to search any character
into string.
Write a C program to count vowels and
consonants of a sentence.
String, String functions, Sorting and Write a C program to find the length of Students will learn about the usage of Dev-Cpp
searching in string(C programming string without using library function. basic operations with strings.
exercises to insert and delete n Write a C program to combine 2 strings into
characters from a given position in a single string without using library function.
string) Write a C program which contains a
function which behaves like the strcmp
function and is capable of determining if
two strings are equal or not.
Write a C program to sort an array of
strings alphabetically.
Write a C program to search any character
into string.
Write a C program to count vowels and
consonants of a sentence.
Practical 8 String, String functions, Sorting and Write a C program to find the length of Students will learn about the usage of Dev-Cpp
searching in string(C programming string without using library function. basic operations with strings.
exercises to count the words and Write a C program to combine 2 strings into
characters in a given line of text) single string without using library function.
Write a C program which contains a
function which behaves like the strcmp
function and is capable of determining if
two strings are equal or not.
Write a C program to sort an array of
strings alphabetically.
Write a C program to search any character
into string.
Write a C program to count vowels and
consonants of a sentence.
String, String functions, Sorting and Write a C program to find the length of Students will learn about the usage of Dev-Cpp
searching in string(writing C programs string without using library function. basic operations with strings.
involving searching and sorting of Write a C program to combine 2 strings into
strings) single string without using library function.
Write a C program which contains a
function which behaves like the strcmp
function and is capable of determining if
two strings are equal or not.
Write a C program to sort an array of
strings alphabetically.
Write a C program to search any character
into string.
Write a C program to count vowels and
consonants of a sentence.
Practical 9 Pointers(writing C programs to locate Write a C program to find out sum of array Students will learn about the usage of Dev-Cpp
basic data type variables using pointers) elements using pointers. Write a C program pointers.
to demonstrate the arithmetic operations on
pointers. Write a C program which is
capable of finding the average of array
elements using pointers.P9 is also reserved
for third lab evaluation.
Pointers(pointer to pointer) Write a C program to find out sum of array Students will learn about the usage of Dev-Cpp
elements using pointers. Write a C program pointers.
to demonstrate the arithmetic operations on
pointers. Write a C program which is
capable of finding the average of array
elements using pointers.P9 is also reserved
for third lab evaluation.
Practical 10 Pointers(pointer to arrays) Students will learn about the usage of Dev-Cpp
Write a C program which is capable of pointers.
searching into array elements using
pointers. Write a C program which is
capable of finding maximum-value and
minimum-value array elements using
pointers. Write a program which is capable
of sort the array elements in the ascending
or descending order with the use of
pointers. Write a C program to process
string elements using pointers.
Pointers(returning pointer from Students will learn about the usage of Dev-Cpp
function) Write a C program which is capable of pointers.
searching into array elements using
pointers. Write a C program which is
capable of finding maximum-value and
minimum-value array elements using
pointers. Write a program which is capable
of sort the array elements in the ascending
or descending order with the use of
pointers. Write a C program to process
string elements using pointers.
Practical 11 Dynamic Memory Allocation(writing C Write a C program which allocates enough Students will learn how the program can Dev-Cpp
programs to implement dynamic memory to read a string, read in another be written with proper memory
memory management using malloc(), string and replace the occurrence of the management.
calloc(), realloc(), free() functions) second string from the first one with the
words "Sample". Please makeuse of
appropriate functions such as malloc to
allocate memory dynamically for both the
strings, realloc to adjust the memory
allocated to the first string, free to free up
the memory allocated to the second string.
Practical 12 Structures and Unions(writing C Write a C program which has Students will learn about the usage of Dev-Cpp
programs using structures and unions) a structure structure and union.
to store the id, name, gender, address and
salary of the employee and the program
should contain functions to input, display
and search for a particular employee.Write
a C program which has a structure
within a structure and display the contents
of structure elements.P12: Reserved for
fourth lab evaluation.
Structures and Unions(writing C Write a C program which has Students will learn about the usage of Dev-Cpp
programs using nested structures) a structure structure and union.
to store the id, name, gender, address and
salary of the employee and the program
should contain functions to input, display
and search for a particular employee.Write
a C program which has a structure
within a structure and display the contents
of structure elements.P12: Reserved for
fourth lab evaluation.
Practical 13 File handling(writing C programs to Write a C program to copy one file into Students will learn about the usage of file Dev-Cpp
read and write in to text and binary files another file. handling and macro #define and #include
opened with different modes) Write a C program to convert the contents
of a file in upper case and write the contents
in another file.
Write a C program which reads the data
present in a file, replaces it with some other
data which is entered from the keyboard in
the file.
Write a C program to create a macro to
swap 2 values with each other.
Write a C program to create a macro with
constant value pi=3.14
File handling(writing C programs to Write a C program to copy one file into Students will learn about the usage of file Dev-Cpp
append to the data present in the files) another file. handling and macro #define and #include.
Write a C program to convert the contents
of a file in upper case and write the contents
in another file.
Write a C program which reads the data
present in a file, replaces it with some other
data which is entered from the keyboard in
the file.
Write a C program to create a macro to
swap 2 values with each other.
Write a C program to create a macro with
constant value pi=3.14
Practical 14 The C Preprocessor(explaining the Write a C program to copy one file into Students will learn about the usage of file Dev-Cpp
concept of C preprocessor directives another file. handling and macro #define and #include.
with #define) Write a C program to convert the contents
of a file in upper case and write the contents
in another file.
Write a C program which reads the data
present in a file, replaces it with some other
data which is entered from the keyboard in
the file.
Write a C program to create a macro to
swap 2 values with each other.
Write a C program to create a macro with
constant value pi=3.14
SPILL OVER
Practical 15 Spill Over