JNTUH CS106ES/CS206ES: PROGRAMMING FOR PROBLEM SOLVING LAB SYLLABUS

JNTUH CS106ES/CS206ES: PROGRAMMING FOR PROBLEM SOLVING LAB SYLLABUS

[Note:The programs may be executed using any available Open Source/ Freely available IDE
Some of the Tools available are:
CodeLite: https://codelite.org/
Code::Blocks: http://www.codeblocks.org/
DevCpp : http://www.bloodshed.net/devcpp.html
Eclipse: http://www.eclipse.org
This list is not exhaustive and is NOT in any order of preference

Course Objectives: The students will learn the following:
 To work with an IDE to create, edit, compile, run and debug programs
 To analyze the various steps in program development.
 To develop programs to solve basic problems by understanding basic concepts in C like operators, control statements etc.
 To develop modular, reusable and readable C Programs using the concepts like functions,arrays etc.
 To Write programs using the Dynamic Memory Allocation concept.
 To create, read from and write to text and binary files
Course Outcomes: The candidate is expected to be able to:
 formulate the algorithms for simple problems
 translate given algorithms to a working and correct program
 correct syntax errors as reported by the compilers
 identify and correct logical errors encountered during execution
 represent and manipulate data with arrays, strings and structures
 use pointers of different types
 create, read and write to and from simple text and binary files
 modularize the code with functions so that they can be reused

Practice sessions:
a. Write a simple program that prints the results of all the operators available in C (including pre/
post increment , bitwise and/or/not , etc.). Read required operand values from standard input.
b. Write a simple program that converts one given data type to another using auto conversion and
casting. Take the values form standard input.
Simple numeric problems:
a. Write a program for fiend the max and min from the three numbers.
b. Write the program for the simple, compound interest.
c. Write program that declares Class awarded for a given percentage of marks, where mark
<40%= Failed, 40% to <60% = Second class, 60% to <70%=First class, >= 70% = Distinction.
Read percentage from standard input.
d. Write a program that prints a multiplication table for a given number and the number of rows in
the table. For example, for a number 5 and rows = 3, the output should be:
e. 5 x 1 = 5
f. 5 x 2 = 10
g. 5 x 3 = 15
h. Write a program that shows the binary equivalent of a given positive number between 0 to 255

Expression Evaluation:
a. A building has 10 floors with a floor height of 3 meters each. A ball is dropped from the top of
the building. Find the time taken by the ball to reach each floor. (Use the formula s = ut+(1/2)at^2
where u and a are the initial velocity in m/sec (= 0) and acceleration in m/sec^2 (= 9.8 m/s^2)).
b. Write a C program, which takes two integer operands and one operator from the user, performs
the operation and then prints the result. (Consider the operators +,-,*, /, % and use Switch Statement)
c. Write a program that finds if a given number is a prime number
d. Write a C program to find the sum of individual digits of a positive integer and test given number is palindrome.
e. A Fibonacci sequence is defined as follows: the first and second terms in the sequence are 0
and 1. Subsequent terms are found by adding the preceding two terms in the sequence. Write
a C program to generate the first n terms of the sequence.
f. Write a C program to generate all the prime numbers between 1 and n, where n is a value
supplied by the user.
g. Write a C program to find the roots of a Quadratic equation.
h. Write a C program to calculate the following, where x is a fractional value.
i. 1-x/2 +x^2/4-x^3/6
j. Write a C program to read in two numbers, x and n, and then compute the sum of this geometric
progression: 1+x+x^2+x^3+………….+x^n. For example: if n is 3 and x is 5, then the program
computes 1+5+25+125.
Arrays and Pointers and Functions:
a. Write a C program to find the minimum, maximum and average in an array of integers.
b. Write a functions to compute mean, variance, Standard Deviation, sorting of n elements in
single dimension array.
c. Write a C program that uses functions to perform the following:
d. Addition of Two Matrices
e. ii. Multiplication of Two Matrices
f. iii. Transpose of a matrix with memory dynamically allocated for the new matrix as row and
column counts may not be same.
g. Write C programs that use both recursive and non-recursive functions
h. To find the factorial of a given integer.
i. ii. To find the GCD (greatest common divisor) of two given integers.
j. iii. To find x^n
k. Write a program for reading elements using pointer into array and display the values using array.
l. Write a program for display values reverse order from array using pointer.
m. Write a program through pointer variable to sum of n elements from array.
Files:
a. Write a C program to display the contents of a file to standard output device.
b. Write a C program which copies one file to another, replacing all lowercase characters with their
uppercase equivalents.
c. Write a C program to count the number of times a character occurs in a text file. The file name
and the character are supplied as command line arguments.
d. Write a C program that does the following:
It should first create a binary file and store 10 integers, where the file name and 10 values are
given in the command line. (hint: convert the strings using atoi function)
Now the program asks for an index and a value from the user and the value at that index should
be changed to the new value in the file. (hint: use fseek function)
The program should then read all 10 values and print them back

e. Write a C program to merge two files into a third file (i.e., the contents of the firs t file followed
by those of the second are put in the third file).
Strings:
a. Write a C program to convert a Roman numeral ranging from I to L to its decimal equivalent.
b. Write a C program that converts a number ranging from 1 to 50 to Roman equivalent
c. Write a C program that uses functions to perform the following operations:
d. To insert a sub-string in to a given main string from a given position.
e. ii. To delete n Characters from a given position in a given string.
f. Write a C program to determine if the given string is a palindrome or not (Spelled same in both
directions with or without a meaning like madam, civic, noon, abcba, etc.)
g. Write a C program that displays the position of a character ch in the string S or – 1 if S doesn‘t
contain ch.
h. Write a C program to count the lines, words and characters in a given text.
Miscellaneous:
a. Write a menu driven C program that allows a user to enter n numbers and then choose between
finding the smallest, largest, sum, or average. The menu and all the choices are to be functions.
Use a switch statement to determine what action to take. Display an error message if an invalid
choice is entered.
b. Write a C program to construct a pyramid of numbers as follows:
1
1 2
1 2 3
*
* *
* * *
1
2 3
4 5 6
1
2 2
3 3 3
4 4 4 4
*
* *
* * *
* *
*
Sorting and Searching:
a. Write a C program that uses non recursive function to search for a Key value in a given
b. list of integers using linear search method.
c. Write a C program that uses non recursive function to search for a Key value in a given
d. sorted list of integers using binary search method.
e. Write a C program that implements the Bubble sort method to sort a given list of
f. integers in ascending order.
g. Write a C program that sorts the given array of integers using selection sort in descending order
h. Write a C program that sorts the given array of integers using insertion sort in ascending order
i. Write a C program that sorts a given array of names
Suggested Reference Books for solving the problems:
i. Byron Gottfried, Schaum’s Outline of Programming with C, McGraw-Hill
ii. B.A. Forouzan and R.F. Gilberg C Programming and Data Structures, Cengage Learning, (3rd
Edition)
iii. Brian W. Kernighan and Dennis M. Ritchie, The C Programming Language, Prentice
iv. Hall of India
v. R.G. Dromey, How to solve it by Computer, Pearson (16th Impression)
vi. Programming in C, Stephen G. Kochan, Fourth Edition, Pearson Education.
vii. Herbert Schildt, C: The Complete Reference, Mc Graw Hill, 4th Edition

CSE-AIML

SEMESTER SUBJECT CODE SUBJECT Lession Plan Lecturer Notes & Question Bank SYLLABUS
I MA101BS Mathematics – I Click Here
I AP102BS Applied Physics Click Here
I CS103ES Programming for Problem Solving Click Here
I ME104ES Engineering Graphics Click Here
I AP105BS Applied Physics Lab Click Here
I CS106ES Programming for Problem Solving Lab Click Here
I MC109ES Environmental Science Click Here
II MA201BS Mathematics – II Click Here
II CH202BS Chemistry Click Here
II EE203ES Basic Electrical Engineering Click Here
II ME205ES Engineering Workshop Click Here
II EN205HS English Click Here
II CH206BS Engineering Chemistry Lab Click Here
II EN207HS English Language and Communication Skills Lab Click Here
II EE208ES Basic Electrical Engineering Lab Click Here
II-I CS310PC Discrete Mathematics Click Here
II-I CS302PC Data Structures Click Here
II-I MA313BS Mathematical and Statistical Foundations Click Here
II-I CS304PC Computer Organization and Architecture
II-I CS311PC Python Programming Click Here
II-I SM306MS Business Economics & Financial Analysis Click Here
II-I CS307PC Data Structures Lab Click Here
II-I CS312PC Python Programming Lab Click Here
II-I MC309 Gender Sensitization Lab Click Here
II-II CS416PC Formal Language and Automata Theory Click Here
II-II CS417PC Software Engineering Click Here
II-II CS403PC Operating Systems Click Here
II-II CS404PC Database Management Systems Click Here
II-II CS412PC Object Oriented Programming using Java Click Here
II-II CS406PC Operating Systems Lab Click Here
II-II CS407PC Database Management Systems Lab Click Here
II-II CS408PC Java Programming Lab Click Here
II-II MC409 Constitution of India Click Here
III-I Design and Analysis of Algorithms Click Here
III-I Machine Learning Click Here
III-I Computer Networks Click Here
III-I Compiler Design Click Here
III-I Graph Theory (PE1) Click Here
III-I Introduction to Data Science(PE1) Click Here
III-I Web Programming(PE1) Click Here
III-I Image Processing(PE1) Click Here
III-I Computer Graphics(PE1) Click Here
III-I Software Testing Methodologies(PE2) Click Here
III-I Information Retrieval Systems(PE2)
III-I Pattern Recognition(PE2) Click Here
III-I Computer Vision and Robotics(PE2) Click Here Click Here
III-I Data Warehousing and Business Intelligence(PE2) Click Here
III-I Machine Learning Lab Click Here
III-I Computer Networks Lab Click Here
III-I Advanced Communication Skills Lab Click Here
III-I Intellectual Property Rights Click Here
III-II Artificial Intelligence Click Here Click Here
III-II DevOps Click Here Click Here
III-II Natural Language Processing Click Here Click Here
III-II Internet of Things(PE3) Click Here Click Here
III-II Data Mining(PE3) Click Here Click Here
III-II Scripting Languages(PE3) Click Here Click Here
III-II Mobile Application Development(PE3) Click Here Click Here
III-II Cryptography and Network Security(PE3) Click Here Click Here
III-II Artificial Intelligence and Natural Language Processing Lab Click Here Click Here
III-II DevOps Lab Click Here Click Here
IV-I Neural Networks & Deep Learning Click Here Click Here
IV-I Reinforcement Learning Click Here Click Here
IV-I Quantum Computing(PE4) Click Here Click Here
IV-I Expert Systems(PE4) Click Here Click Here
IV-I Cloud Computing(PE4) Click Here Click Here
IV-I Game Theory(PE4) Click Here Click Here
IV-I Mobile Computing(PE4) Click Here Click Here
IV-I Expert Systems(PE4) Click Here Click Here
IV-I Cloud Computing(PE4) Click Here Click Here
IV-I Game Theory(PE4) Click Here Click Here
IV-I Mobile Computing(PE4) Click Here Click Here
IV-I Social Network Analysis(PE5) Click Here Click Here
IV-I Federated Machine Learning(PE5) Click Here Click Here
IV-I Augmented Reality & Virtual Reality(PE5) Click Here Click Here
IV-I Web Security(PE5) Click Here Click Here
IV-I Ad-hoc & Sensor Networks Click Here Click Here
IV-I Deep Learning Lab Click Here Click Here
IV-II Organizational Behaviour Click Here Click Here
IV-II Speech and Video Processing(PE6) Click Here Click Here
IV-II Robotics Process Automation(PE6) Click Here Click Here
IV-II Randomized Algorithms(PE6) Click Here Click Here
IV-II Cognitive Computing(PE6) Click Here Click Here
IV-II Semantic Web(PE6) Click Here Click Here

Add Comment

Your email address will not be published. Required fields are marked *

Style switcher RESET
Body styles
Color settings
Link color
Menu color
User color
Background pattern
Background image