24CS203ES101 - Problem Solving Using C Programming - B. Vijay Kumar - Course Plan
24CS203ES101 - Problem Solving Using C Programming - B. Vijay Kumar - Course Plan
For
Course Instructors :
1. Prof. M.Sheshikala
2. Dr P.Pramod Kumar
3. Dr.P.Praveen
4. Dr V.Thirupati
5. Intern 6
6. Intern 10
7. Intern 14
8. Intern 22
9. Intern 23
10. Intern 24
L-T-P : 3-0-4
Credits :5
Page 1 of 15
SR University,
Warangal
Contents
1.COURSE CONTEXT ............................................................................................................ 3
3.COURSESUMMARY ........................................................................................................... 3
4.COURSE-SPECIFIC LEARNING OUTCOMES (CO) ........................................................ 3
5.DETAILED SYLLABUS ...................................................................................................... 4
6.STUDIOWORK/LABORATORYEXPERIMENTS: ............................................................ 4
7.TEXTBOOKS/LEARNING RESOURCES: ......................................................................... 6
8.REFERENCE BOOKS/LEARNING RESOURCES: ........................................................... 6
9.MOOC COURSES (Reference to the Course): ..................................................................... 6
10.Lecture Wise Plan ................................................................................................................ 6
11.Lab Wise Plan ...................................................................................................................... 7
12.Evaluation Components ..................................................................................................... 13
13.Software/Tools Used: ........................................................................................................ 13
14.Hardware/Devices Used: ................................................................................................... 13
15.Attendance Policy .............................................................................................................. 13
16.Academic Dishonesty & Plagiarism .................................................................................. 13
17.Instructor Responsible for Lecture PPTs Preparation ........................................................ 13
18.Instructor Responsible for Preparation of Lab Assignments ............................................. 14
19.Instructor Responsible for Preparation of Course File....................................................... 14
20.Instructor Responsible for Conduction of Hackathon........................................................ 14
Page 2 of 15
1. COURSE CONTEXT
DEPARTMENT CS & AI
SCHOOL CS & AI
DATE THIS COURSE WILL
DEGREE B.Tech. BE EFFECTIVE FROM 29th Jul–29th
Nov,2024
2. COURSE BRIEF
Problem Solving
COURSE TITLE using C Programming PRE-REQUISITES Mathematics
Fundamentals
COURSE CODE 24CS203ES101 TOTAL CREDITS 5
COURSE TYPE Engineering Sciences L-T-PFORMAT 2-0-6
3. COURSE SUMMARY
C is one of the most important among all programming languages. It is used to program desktop
applications, compilers, tools, utilities, and even hardware devices. The C language is fast and
efficient. Once a student takes this, he/she will be able to apply the knowledge gained in this course in
the course offered in higher semesters.
A "Problem Solving using C Programming" course typically covers the fundamentals of
programming using the C programming language, emphasizing problem-solving skills and algorithmic
thinking. To develop the problem-solving skills for Ist Year student „C‟ is the best programming
language. Throughout the course, students typically engage in hands-on programming assignments
and projects to apply the concepts they learn. Problem-solving exercises may range from simple
algorithms to more complex programming challenges. The course aims to equip students with a solid
foundation in C programming and problem-solving skills, laying the groundwork for further
exploration in computer science and software development.
PO/
PSO PO PO PO PO PO PO PO PO PO PO PO PO PSO PSO
1 2 3 4 5 6 7 8 9 10 11 12 1 2
CO
CO1 2 2 2 1 2 2
CO2 2 3 2 2 1 2
CO3 2 2 3 2 2 3 3 3
Mapping 2 2 2.6 2 2 1.6 0 1 2.5 2 3 2.3
Target Level
Page 3 of 15
5. DETAILED SYLLABUS
UNIT – I (5)
problem solving techniques-algorithm- properties, constituent of algorithms / different strategies- sequence,
selection and repetition, flow chart, examples.
Introduction to C Programming Language: history of C language, C tokens, data types - primary and
secondary data types, input and output statements, basic structure of C program, operators, expression
evaluation, type conversion, example programs.
UNIT – II (5)
Decision Making and Branching: simple if, if else, if else ladder, nested if, switch, nested switch-syntax,
flowchart, and example programs.
Decision Making and Looping: while, do-while, for statements, nested loops-syntax, flowchart, and example
programs.
Unconditional Branching Statements: break, continue and go to-syntax, flowchart, and example programs.
Strings: Declaration, Initialization, Operations on Strings, String Manipulation Functions, example programs.
UNIT – IV (5)
Modular Programming Approach: Functions- basic terminology, types of functions, elements of user
defined function- function prototype, function call and function definition, inter function communication,
passing 1D array and 2D array as arguments to functions, Passing String as an argument in Functions,
example programs,Storage Classes, Recursion.
Pointers
Basics of pointers, Types of pointers-Wild, Null, Dangling, Void, pointer to pointer, pointer to array, array of
pointers, pointer to strings, Parameter Techniques-Call by Value, Call by Reference - example programs.
UNIT V (4)
Structures
Basics of structure in C, structure members, accessing structure members, nested structures, array of
structures, pointers to structures - example programs, Unions- accessing union members- example programs.
6. STUDIOWORK/LABORATORYEXPERIMENTS:
Sl.No. Particulars
1 Write a C program to convert decimal to binary number system using bitwise operator.
2 Write a C program to convert specified days into years, weeks and days.
Note: Ignore leap year.
3 Write a C program to read an amount (integer value) and break the amount into smallest possible number of
bank notes.
Page 4 of 15
4 Write a C program to read an amount (integer value) and break the amount into smallest possible number of
bank notes.
5 1. Write a C program to check if a given integer is positive even, negative even, positive odd or negative odd.
Print even if the number is 0.
Test Data :
6 2. Write a C program to check if a given integer is positive even, negative even, positive odd or negative odd.
Print even if the number is 0.
Test Data :
7 1. Write a C program to check whether the given year is leap or not.
2. Write a C program to check whether the given number is even or odd.
8 3. Write a C program to check whether you are eligible for voting or not.
Write a C program to print 3 numbers in a line, starting from 1 and print n lines. Accept number of lines (n,
integer) from the user.
9 Write a C program to print a number, it‟s square and cube in a line, starting from 1 and print n lines. Accept
number of lines (n, integer) from the user.
10 Write a program in C to display the first n terms of Fibonacci series.
Fibonacci series 0 1 1 2 3 5 8 13 .....
11 Write a program in C to check whether a number is a palindrome or not.
Write a Program in C to find factorial of given number
12 Write a C program to check whether a number is a Strong Number or not.
Write a C program to check whether a number is a Prime Number or not.
13 Write a C Program to Check Whether a Given Number is Perfect Number
14 Write a C Program to print Armstrong Numbers between range.
15 Write a C program to find sum of even and odd numbers between 1 to 10.
Write a C program to find the sum and average of N natural numbers
16 Write a C program to print prime numbers between 1to 100
17 Write a C program to print below patterns
a) * * * * *
*****
*****
*****
*****
18 Write a C program to search an element in an array.
19 Write a C program to delete an element from an array at specified position.
20 Write a C program to count total number of duplicate elements in an array
21 Write a program to pick up the largest number from any 5 row by 5 column matrices.
22 Write a C programs to perform the addition &multiplication of 2 matrices.
23 Display all prime numbers between two intervals using a function.
24 Check prime and Armstrong number by making function.
25 Check whether a number can be expressed as the sum of two prime numbers using a function
26 Find sum of natural numbers using recursion
27 Calculate factorial of a number using recursion
28 Find G.C.D using recursion.
29 Reverse a sentence using recursion.
30 Write a C program to print Fibonacci series using recursion.
31 Write a C program to print sum of digits of a given number using recursion.
32 Write C programs to demonstrate types of pointers.
33 Compute sum of the array elements using pointers.
34 Write a C program to find the sum of all elements of an array using pointers as arguments.
35 Write a C program to convert a Floating Point Number base(10) to binary number.
36 Write a C program to print reverse of a given 1D array elements by passing 1D array as argument to the
function.
37 Write a C program to transpose the given 2D array by passing it as argument to a function.
38 Write a C program to read a string, two characters and then check if character1 is occurred in string replace it
Page 5 of 15
with character2 by using string as a parameter to a function.
39 Write a C program to find largest number using pointers to functions from a given list of elements.
40 Write a C program to replace the smallest element with its square, largest element with its square root in each
list of 2D array elements by using pointers
41 Write a C program that uses functions to perform the following operations:
42 To insert a sub-string in to given main string from a given position.
43 To delete n characters from a given position in each string.
44 Write a C program to determine whether the given string is a palindrome or not.
45 Write a C program for defining a structure of bank customer details.( account number , acc holder name,
acctype, balance )
46. Write a C program to demonstrate electricity bill of one year.
47. Store Information (name, roll and marks) of a Student Using Structure
48. Add Two Distances (in inch-feet) System Using Structures
49. Add Two Complex Numbers by Passing Structure to a Function
50. Store Information of 10 Students Using Structure
7. TEXTBOOKS/LEARNING RESOURCES:
2. Coursera- C-for-Everyone-Programming-Fundamentals-by-University-of-California-Santa-Cruz
https://www.coursera.org/learn/c-for-everyone
Page 8 of 15
No.of
Hours
No. Content Planned
1
Practice:
1. Write a C program to convert a string to an unsigned long integer. 3
Test Data and Expected Output :
Input an unsigned number: 25
Output: 25
2. Write a C program to convert a string to a double.
Expected Output :
Output= 4.00
3. Write a program in C that reads a forename, surname and year of birth and display the names and
the year one after another sequentially.
Expected Output :
Input your firstname: Tom
Input your lastname: Davis
Input your year of birth: 1982
Tom Davis 1982
2
Practice:
1. Write a C program to integral quotient and remainder of a division.
2. Write a C program that accepts two item‟s weight (floating points' values ) and number of purchase 3
(floating points' values) and calculate the average value of the items.
Test Data :
Weight - Item1: 15
No. of item1: 5
Weight - Item2: 25
No. of item2: 4
Expected Output:
Average Value = 19.444444
3. Write a C program to check Least Significant Bit (LSB) of a number is set or not.
4. Write a C program to convert decimal to binary number system using bitwise operator.
5. Demonstration on special operator.
Assignment
1. Write a C program to convert specified days into years, weeks and days.
Note: Ignore leap year.
Test Data :
Number of days : 1329
Expected Output :
Years: 3
Weeks: 33
Days: 3
2. Write a C program to read an amount (integer value) and break the amount into smallest possible
number of bank notes.
Test Data :
Input the amount: 375
Expected Output:
There are:
3 Note(s) of 100.00
1 Note(s) of 50.00
1 Note(s) of 20.00
0 Note(s) of 10.00
1 Note(s) of 5.00
0 Note(s) of 2.00
0 Note(s) of 1.00
3. Write a C program that accepts 4 integers p, q, r, s from the user where r and s are positive, and p is
even. If q is greater than r and s is greater than p and if the sum of r and s is greater than the sum
Page 9 of 15
of p and q print "Correct values", otherwise print "Wrong values".
TestData:
Input the first integer: 25
Input the second integer: 35
Input the third integer: 15
Input the fourth integer: 46
Wrong values
3
Practice: 3
1. Demonstration on expression evaluation.
2. Demonstration on type conversion.
3. Demonstration on precedence & associatively rules.
Assignment:
1. Write a C program to check if a given integer is positive even, negative even, positive odd or
negative odd. Print even if the number is 0.
Test Data :
Input an integer: 13
Expected Output:
Positive Odd
2. Write a C program to check whether the given year is leap or not.
3. Write a C program to check whether the given number is even or odd.
Page 10 of 15
4
Practice: 3
1. Write a C program that reads an integer between 1 and 12 and print the month of the year in
English.
Test Data :
Input a number between 1 to 12 to get the month name: 8
Expected Output:
August
2. Write a C program to find the largest of three numbers.
Test Data : 12 25 52
Expected Output :
1st Number = 12, 2nd Number = 25, 3rd Number = 52
The 3rd Number is the greatest among three
3. Write a C program to check whether a character is an alphabet, digit or special character.
TestData@
ExpectedOutput :
This is a special character
4. Write a program in C which is a Menu-Driven Program to compute the area of the various geometrical
shape.
Test Data :
1
5
ExpectedOutput :
The area is : 78.500000
4. Write a C program to create Simple Calculator using switch case.
Assignment
1.Write a C program to print 3 numbers in a line, starting from 1 and print n lines. Accept
number of lines (n, integer) from the user.
Test Data :
Input number of lines: 4
Expected Output:
123
456
789
10 11 12
2.Write a C program to print a number, it‟s square and cube in a line, starting from 1 and print n
lines. Accept number of lines (n, integer) from the user.
Test Data :
Input number of lines: 4
Expected Output:
111
248
3 9 27
4 16 64
3.Write a program in C to display the first n terms of Fibonacci series.
Fibonacci series 0 1 1 2 3 5 8 13 .....
Test Data :
Input number of terms to display : 10
Expected Output :
Here is the Fibonacci series upto to 10 terms :
0 1 1 2 3 5 8 13 21 34
4.Write a program in C to check whether a number is a palindrome or not.
TestData:
Inputanumber:121
ExpecteOutput : 121 is a palindrome number.
Page 11 of 15
5
Practice: 3
6
Practice: 3
1. Write a program to pick up the largest number from any 5 row by 5 column matrices.
2. Write a C programs to perform the addition &multiplication of 2 matrices.
Assignment
1. Display all prime numbers between two intervals using a function.
2. Check prime and Armstrong number by making function.
3. Check whether a number can be expressed as the sum of two prime numbers using a function
Buffer Class
7
Practice: 3
1. Write C programs to demonstrate all storage classes.
2. Find sum of natural numbers using recursion
3. Calculate factorial of a number using recursion
4. Find G.C.D using recursion.
5. Reverse a sentence using recursion.
Assignment:
1. Write a C program to print Fibonacci series using recursion.
2. Write a C program to print sum of digits of a given number using recursion.
8
3
Practice:
1. Write a C program to find length of a string.
2. Write a C program to copy one string to another string.
3. Write a C program to concatenate two strings.
4. Write a C program to compare two strings.
5. Write a C program to determine if the given string is a palindrome or not.
6. Write a C program to demonstrate all string handling functions.
Assignment:
1. Write a program in C to find maximum occurring character in a string.
Test Data :
Input the string : Welcome to Bheemaram
Expected Output :
The Highest frequency of character 'e'
appears number of times : 4
Page 12 of 15
2. Write a program in C to read a sentence and replace lowercase characters by uppercase and
vice-versa.
Test Data :
Input the string : This Is A Test String.
Expected Output :
The given sentence is : This Is A Test String.
After Case changed the string is: tHISiS a tESTsTRING.
3. Write a program that replaces two or more consecutive blanks in a string by a single blank. For
example, if the input is Grim return to the planet of apes!!
the output should be
Grim return to the planet of apes!!
9
Practice: 3
1. Write C programs to demonstrate types of pointers.
2. Compute sum of the array elements using pointers.
3. Write a C program to find the sum of all elements of an array using pointers as arguments.
4. Write a C program to convert a Floating Point Number base(10) to binary number.
Assignment:
1. Write a C program to print reverse of a given 1D array elements by passing 1D array as
argument to the function.
2. Write a C program to transpose the given 2D array by passing it as argument to a function.
3. Write a C program to read a string, two characters and then check if character1 is occurred in
string replace it with character2 by using string as a parameter to a function.
10
3
Practice:
1. Write a C program to find largest number using pointers to functions from a given list of
elements.
2. Write a C program to replace the smallest element with its square, largest element with its
square root in each list of 2D array elements by using pointers
Assignment:
1. Write a C program that uses functions to perform the following operations:
2. To insert a sub-string in to given main string from a given position.
3. To delete n characters from a given position in each string.
4. Write a C program to determine whether the given string is a palindrome or not.
11
Practice: 3
1. Write a C program for defining a structure of bank customer details.( account number , acc
holder name, acctype, balance )
2. Write a C program to demonstrate electricity bill of one year.
Assignment:
1. Store Information (name, roll and marks) of a Student Using Structure
2. Add Two Distances (in inch-feet) System Using Structures
Page 13 of 15
12
Practice: 3
18. Instructor Responsible for Preparation of Lab Assignments & LMS: Dr. P Pramod
Kumar
Page 14 of 15
19. Instructor Responsible for Preparation of Course File: Dr. P. Praveen
Page 15 of 15