B.Tech I Year I Sem
Programming for Problem Solving Lab
Every program in the JNTUH R22 Programming for Problem Solving (C) lab, with the aim, algorithm, code, real output, common mistakes and viva questions.
C47 experimentsJNTUH R22 · CS108ESUpdated
Practice sessions
Simple numeric problems
Expression evaluation
- 8Time taken by a falling ball to reach each floor
- 9Simple calculator using a switch statement
- 10Check whether a number is prime
- 11Sum of digits and palindrome number check
- 12First n terms of the Fibonacci sequence
- 13Prime numbers from 1 to n
- 14Roots of a quadratic equation
- 15Sum of the series 1 - x/2 + x²/4 - x³/6
- 16Sum of the geometric progression 1 + x + x² + ... + xⁿ
Arrays, pointers and functions
- 17Minimum, maximum and average of an array
- 18Mean, variance, standard deviation and sorting of an array
- 19Addition of two matrices using functions
- 20Multiplication of two matrices using functions
- 21Transpose of a matrix with dynamic memory allocation
- 22Factorial using recursive and non-recursive functions
- 23GCD of two numbers using recursive and non-recursive functions
- 24x to the power n using recursive and non-recursive functions
- 25Read array elements using a pointer
- 26Display array values in reverse order using a pointer
- 27Sum of n array elements using a pointer
Files
Strings
- 33Convert a Roman numeral to decimal
- 34Convert a decimal number to Roman numeral
- 35Insert a substring into a string at a given position
- 36Delete n characters from a given position in a string
- 37Check whether a string is a palindrome
- 38Find the position of a character in a string
- 39Count lines, words and characters in a text
Miscellaneous
Sorting and searching
Writing your lab record
- Aim: one sentence saying what the program does.
- Algorithm: the steps in plain words, before any code.
- Program: the code you wrote and ran yourself.
- Output: the output from your own run, with your own sample input.
Use these pages to check your understanding and your output, then write the record in your own words.
Experiment list from the official JNTUH R22 B.Tech CSE syllabus (course CS108ES, pages 16–18). Laviyx Learn is not affiliated with JNTUH. Your college may add or change experiments, so check your own lab manual too.