Programming With C Lab Programs Weekly Plan
Programming With C Lab Programs Weekly Plan
COURSE OUTCOMES:
1) Write a maintainable C program for a given algorithm.
2) To develop programs using the basic elements like control statements, Arrays and Strings.
3) To solve the memory access problems by using pointers
4) To understand about the code reusability with the help of user defined functions.
5) Trace the given C program manually.
6) Write C program for simple applications of real life using structures and files.
5 Write a program to print the following pattern for given ‘n’ value
For Eg. If n = 4, the output would be
2
3 5
7 11 13
17 19 23 29
Week12: Functions
1 Write a program to implement the string operations like Length of String, String Copying,
String Concatenation, Conversion to Uppercase and String Comparison.( Define own
Function for each of the operation. Header file “string.h” is not allowed)
2 Write a C program to implement Multiplication and Division Operations without using
operators “*” and “\” respectively. Define function “mul” for multiplication and “div” for
integer division.
Week13: Recursion
1 Write a program to print the integers from 1 to N and then N to 1 for the given input number
‘N’ without using any loops.
2 Write a program to find the X power N(XN) using the user defined recursive function
“pow(X,N)” without using any predefined function from the library.
3 Write a program to find the GCD of two numbers ‘a’ and ‘b’ by defining a recursive function
GCD(a,b).
Week 14: Structures
1 Write a program to take the information of ‘n’ Students (REGID, Name, CGPA, Address –
Village, District, Phone NO) and print the topper among the n students
2 Write a program to take the information of ‘n’ Students (REGID, Name, CGPA, Address –
Village, District, Phone NO) and print the students in the ascending order of Regn ID.
3 Write a program to take the information of ‘n’ Students (REGID, Name, CGPA, Address –
Village, District, Phone NO)and print the list of Phone Number for the students who are the
above average of CGPA.
Week 15: File Handling – Create, Read and Write operations on File
1 Write a program to print the number of lines and words in a given input file name.
2 Write a program to copy from the given file to another file.
3 Write a program to append one file at the end of another file.
4 Write a program to search for a word in a given text file.
Text Books:
1. Programming in C by Reema Thareja, Oxford Higher Education Paperback 2011
Video Reference:
Title Expert Name Affiliation Weblink
Introduction to Prof. Satyadev IIT KANPUR http://nptel.ac.in/courses/106104128
Programming in C Nandakumar