PPS V2 Common To All

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Programming for Problem Solving

[As per NEP, Outcome Based Education (OBE)Choice Based Credit System (CBCS) scheme]
(Effective from the academic year 2024-2025)
SEMESTER – I/II
Subject Code 24PPS104/24PPS204 CIE Marks 50
Number of Lecture 03 SEE Marks 50
Hours/Week
Total Number of 40 Exam Hours 03
Lecture Hours
CREDITS – 03
Course Learning objectives:
• Gain the knowledge of the basic principles of Problem solving.
• Learn how to use C programming language to specify data and operations on data.
• Understand the concept of decision-making types through programming
• Understand the concept of modularization via functions and 1D and 2-D array
• Understand and explore systematic techniques and approaches for constructing C
Programs using string manipulation functions
Module I Teaching RBT
Hours Level
Introduction to computers: Computer Languages, algorithm and flow
charts, Creating and Running Programs, System Development.
Introduction to C programming: Background, Structure of C Program, L1, L2,
C-Tokens, Identifiers, Data Types, Variables, Constants, Input/ Output. 08
L3
Formatting Input/Output. Library Functions, Single Character Input –
The getchar() , Single Character Output-The putchar.
Module II
Operators and Expressions: Arithmetic operators, Unary operators,
Relational and Logical Operators, Assignment Operators, Conditional
Operators. Expressions, Precedence and Associativity, Evaluating
Expressions, Type Conversion. Selection - Making Decision: Two Way L1, L2,
Selection, Multiway Selection, Repetition: Concepts of a loop, Pretest 08
L3
and Post-test Loops, Initialization and Updating, Loops in C: The while
loop, the do. while loop, The for loop, The break and continue statement,
the goto statement.
Module III
Arrays: Concepts, using arrays in C: Declaration and Definition,
Accessing Elements in Array, Storing Values in Arrays, processing an
array, Sorting and Searching. Two Dimensional Arrays, Functions in C: L1, L2,
A brief Overview, defining a Function, User Defined Functions, 08
L3
Function Prototypes, Passing Arguments to a Function, Scope-global and
local; Recursion
Module IV

Storage Classes: automatic variables, external (global) variables, static


variables Strings: String Concepts, defining a String, Declaring Strings,
Initializing String, Arrays of Strings, String Manipulations Functions L1, L2,
Pointers: Pointer Concepts, Pointer Declaration and Definition, 08
L3
Initialization of Pointer Variables, Passing Pointers to a Function,
Pointers and Array.
Module V
Derived Types: Enumerated Types: Declaring an Enumerated Type, 08 L1, L2,
Operations on Enumerated Types, Initializing Enumerated Constants.
Structures and Unions: Structure Type Declaration, Initialization,
Accessing Structures, Structures Containing Arrays, Array of L3
Structures. Unions and Structures. File Handling: Using Binary Files,
Reading and Writing a Data File.

Course Outcomes
The students should be able to:
1. Identify the basic elements of Computing Systems and C Programming Constructs.
2. Demonstrate the use of Operators & Expressions, Decision Making and Looping Statements.
3. Explore Arrays and User-Defined Functions in Implementing Solutions to Real world Problems
4. Illustrate the usage of Storage Classes, Strings and Pointers in Problem Solving.
5. Demonstrate the use of Modular Programming Constructs involving Files, Structure & Unions.
Question paper pattern:
The question paper will have ten questions.
There will be 2 questions from each module.
Each question will have questions covering all the topics under a module.
The students will have to answer 5 full questions, selecting one full question from each module.
Text Book:
1. Behrouz A. Forouzan, Richard F. Gilberg - Computer science a structured programming
approach using C, Cengage Learning, and ISBN: 9788131503638, 8131503631, 3rd
edition, 2007.
2. A M Padma Reddy -C programming Techniques
Reference Books:
1. E. Bala Guruswamy - Programming in ANSI C, Tata McGraw-Hill, 7th edition, 2. Reema
Thareja - Computer fundamentals and programming in C, Oxford University, 2nd edition, 2017.
3. Brian W. Kernighan and Dennis M. Ritchie - The ‘C’ Programming Language, Prentice Hall of
India.
Programming for Problem Solving Laboratory
[As Per NEP, Outcome Based Education (OBE) and Choice Based Credit System
(CBCS)Scheme]
(Effective from the academic year 2024-2025)
SEMESTER – I/II
Course Code 24PPL107/ CIE Marks 50 Marks
24PPL207
Number of Lecture SEE Marks 50 Marks
2
Hours/Week
Exam Hours 3 hours
CREDITS – 01
Implement all the programs in “C ” Programming Language and Linux OS/Ubuntu
Course objectives:

1. To understand and write simple programmes


2. To develop programs on arithmetic operations
3. Understand decision making, repetitions using programming
4. Understand 1-D and 2-D array using programming
5. To develop programs using modularity
6. To understand use of strings in C programming
7. To develop code using indirection referencing
8. To Understand the difference between unions, structures and files
S.No. List of Experiments:

1. Creating and Running Simple C Programs:


 C-Program to calculate the sum of three numbers / C-Program to demonstrate a Simple Cal-
culator.
 C-Program to calculate the area and circumference of a circle using PI as a defined con-
stant.
 C-Program to convert temperature given in Celsius to Fahrenheit and Fahrenheit to Celsius
 C-Program to compute the roots of a quadratic equation by accepting the coefficients.
2. Creating and Running C Programs on Expressions:
 C-Program to calculate quotient and reminder of two numbers.
 C-Program to demonstrate automatic and type casting of numeric types
 C-Program to calculate a student’s average score for a course with 4 quizzes, 2 midterms
and a final. The quizzes are weighted 30%, the midterms 40% and the final 30%
Creating and Running C Programs on Making Decision: .
3.
 C-Program to read a test score, calculate the grade for the score and print the grade
 C-Program to uses a menu to allow the user to add, multiply, subtract and divide two num-
bers using switch case.
 C-Program to read the name of the user, number of units consumed and print out the
charges. An electricity board charges the following rates for the use of electricity: o For the
first 200 units 80 paise per unit o For the next 100 units 90 paise per unit o Beyond 300 units
Rs 1 per unit. All users are charged a minimum of Rs. 100 as meter charge. If the total
amount is more than Rs 400, then an additional surcharge of 15% of total amount is charged
Creating and Running C Programs on Repetition or Loops:
4.
 C-Program to print a number series from 1 to a user-specified limit in the form of a right
triangle
 C-Program to print the number and sum of digits in an integer.
 C-Program to calculate the factorial of a number using for loop/ Recursion
 C-Program to calculate nth Fibonacci number.
 C-Program to convert binary to a decimal number
Creating and Running C Programs on One Dimensional Arrays:
5.
 C-Program to print square of index and print it.
 C-Program to calculate average of the number in an array
 C-Program to sort the list using bubble sort.
 C-Program to search an ordered list using binary search.
6. Creating and Running C Programs on Two Dimensional Arrays:
 C-Program to perform addition of two matrices.
 C-Program to perform multiplication of two matrices.
 C-Program to find transpose of the given matrices.
 C-Program to find row sum and column sum and sum of all elements in a matrix.
 C-Program initialize/fill all the diagonal elements of a matrix with zero and print.
7. Creating and Running C Programs on User Defined Functions:
 C-program to read a number, find its factorial using function with argument and with return
type.
 C-Program to read two number, find its GCD and LCM using function with arguments and
without return type.
 C-Program to read a number, find whether it is a palindrome or not using function without
argument and with return type.
 C-Program to read a number, find whether it is prime number or not using function without
arguments and without return type
8. Creating and Running C Programs on Strings:
 C-program read two strings, combine them without using string built-in functions.
 C-program read two strings, compare them without using string built-in functions.
 C-program read two strings, concatenate them without using string built-in functions.
 C Program to Check if the Substring is Present in the Given String.
 C-program to demonstrate built-in sting functions like strlen(), strcpy(), strcmp(), strcat().
9. Creating and Running C Programs on Storage Classes and Pointers:
 C-program to show the use of auto and static variable.
 C-program to add two numbers using pointers.
 C-program to swap two numbers using pointers.
 C-program to show how the same pointer can point to different data variable.
 C-program to show the use of different pointers point to the same variable
 C-Program to read an array of elements, compute its sum using pointers
10. Creating and Running C Programs on Unions:
• C-Program to demonstrate union of short int and two char
11. Creating and Running C Programs on Structures:
 C Program to read employee details (name, salary, address) and print the same using struc-
ture.
 C-Program to read marks of three students in 3 subjects. Calculate the total marks scored,
student wise and subject wise using structure.
12. Creating and Running C Programs on Files:
 C-Program to demonstrate function fread()/fscanf()
 C-Program to demonstrate function fwrite()/fprintf()

You might also like