0% found this document useful (1 vote)
328 views

Programming With C Lab Programs Weekly Plan

This document outlines the course objectives, outcomes, weekly plan, and assignments for a Programming with C Lab course, which introduces students to programming concepts in C including variables, data types, control structures, functions, arrays, strings, structures, and file handling through a series of programming assignments over 15 weeks. The course aims to teach students how to approach computational problems, write code in C, and develop simple applications.

Uploaded by

Shakar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
328 views

Programming With C Lab Programs Weekly Plan

This document outlines the course objectives, outcomes, weekly plan, and assignments for a Programming with C Lab course, which introduces students to programming concepts in C including variables, data types, control structures, functions, arrays, strings, structures, and file handling through a series of programming assignments over 15 weeks. The course aims to teach students how to approach computational problems, write code in C, and develop simple applications.

Uploaded by

Shakar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Course Coordinator L T P C

Course/subject Name: Programming with C Lab 0 0 3 1.5


G.Jaya Krishna Total Contact Hours: 48
Prerequisite: No prior programming required; mathematical
maturity of a second level UG student in science or engineering.
COURSE OBJECTIVE
1. Identify situations where computational methods and computers would be useful.
2. Given a computational problem, identify and abstractthe programming task
involved.
3. Approach the programming tasks using techniques learned and write pseudo-
code.
4. To understand the concepts of Programming language
5. To learn the basics of C declarations, operators and expressions
6. To learn on the manipulation of strings, functions and pointers
7. To apply concepts and techniques for implementation

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.

Programming with C Lab- Programs Weekly Plan

Week 1&2: Statements, Expressions & Conditionals


1 Write a program to print the memory allocation required for all the datatype in C Language.
2 Write a program to check whether the given number is even number or odd number.
3 Write a menu based program to take of input of two values followed input of choice and
accordingly perform arithmetic operations like Addition, Subtraction, Multiplication,
Modulus, Division, Power( Using Switch Statement)
4 Write a program to swap two given numbers with and without using extra variable.
5 Write a program to find out the whether the given number is a perfect square or not.
6 Write a program to find out whether the given number is positive, negative or zero value.
Week 3: Iterative Constructs - I: For Loop, While Loop &Do. While
1 Write a program print all the factors of a given number
2 Write a program to find the factorial of a given number

3 Write a program to find whether a given number is Palindrome or not.


4 Write a program to find whether a given number is Prime or not.
5 Write a program to print the Fibonacci series upto given ‘n’ number of terms.
Week4: Iterative Constructs – II: Nested Loops
1 Write a program to print the first ‘n’ prime numbers and prime numbers upto ‘n’ value.
2 Write a program to print the Pascal Triangle for given ‘n’ value
3 Write a program to print the first ‘n’ perfect number for a given ‘n’ value.
4 Write a program to print the following pattern for given ‘n’ value.
For Eg. If n = 3, the output would be
*
* * *
* * * * *
* * *
*

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

Week 5: Single Dimensional Arrays – I : Basic Operations and Problems


1 Write a program to take an input array of ‘n’ numbers and find out the sum of all the elements,
product of all the elements and mean of the array.
2 Write a program to take an input array of ‘n’ numbers and print the second smallest and
second largest element of all elements in the array.
3 Write a program to take an input of two sorted arrays having ‘m’ and ‘n’ number of elements
respectively and merge the respective sorted arrays into another sorted array of size ‘M+N’

Week 6&7: Single Dimensional Arrays – II : Searching and Sorting


1 Write a program to implement Linear Search Algorithm
2 Write a program to implement Binary Search Algorithm
3 Write a program to implement Bubble Sort Algorithm
4 Write a program to implement Selection Sort Algorithm
Week8&9: Two Dimensional Arrays –Matrices& its operations
1 Write a program to find the addition and subtraction for the given two matrices of sizes ‘M x
N’ and ‘P x Q’ respectively
2 Write a program to find the multiplication of the given two matrices of sizes ‘M x N’ and ‘P x
Q’ respectively.
3 Write a program to find whether the given matrix is Orthogonal or not.
Week10: Strings – Dealing with non-numerical data
1 Write a program to convert the Lower Case letters to Upper Case Letters and Upper Case
Letters to Lower Case Letters in a given input string.
2 Write a program to the print out the number of vowels, consonants, and digits (0-9) present in
the given input string.
3 Write a program to check whether the given input string is palindrome string or not
4 Write a program to sort the given string of characters.
Week11: Array of Strings
1 Write a program to find the strings starting with “c” and “a” for the given n input strings..
2 Write a program to print the words of given input string in reverse order For Eg. If input
string is “I am an Indian”, the output would be “Indian an am I”
3 Write a program to arrange the given ‘n’ strings in Dictionary Order.

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

You might also like