Skip to content
Laviyx Learn

Try

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

  1. 1Results of all the operators
  2. 2Type conversion and type casting

Simple numeric problems

  1. 3Maximum and minimum of three numbers
  2. 4Simple interest and compound interest
  3. 5Class awarded for a percentage of marks
  4. 6Multiplication table for a number
  5. 7Binary equivalent of a number from 0 to 255

Expression evaluation

  1. 8Time taken by a falling ball to reach each floor
  2. 9Simple calculator using a switch statement
  3. 10Check whether a number is prime
  4. 11Sum of digits and palindrome number check
  5. 12First n terms of the Fibonacci sequence
  6. 13Prime numbers from 1 to n
  7. 14Roots of a quadratic equation
  8. 15Sum of the series 1 - x/2 + x²/4 - x³/6
  9. 16Sum of the geometric progression 1 + x + x² + ... + xⁿ

Arrays, pointers and functions

  1. 17Minimum, maximum and average of an array
  2. 18Mean, variance, standard deviation and sorting of an array
  3. 19Addition of two matrices using functions
  4. 20Multiplication of two matrices using functions
  5. 21Transpose of a matrix with dynamic memory allocation
  6. 22Factorial using recursive and non-recursive functions
  7. 23GCD of two numbers using recursive and non-recursive functions
  8. 24x to the power n using recursive and non-recursive functions
  9. 25Read array elements using a pointer
  10. 26Display array values in reverse order using a pointer
  11. 27Sum of n array elements using a pointer

Files

  1. 28Display the contents of a file
  2. 29Copy a file converting lowercase to uppercase
  3. 30Count a character in a file using command-line arguments
  4. 31Create and update a binary file of integers
  5. 32Merge two files into a third file

Strings

  1. 33Convert a Roman numeral to decimal
  2. 34Convert a decimal number to Roman numeral
  3. 35Insert a substring into a string at a given position
  4. 36Delete n characters from a given position in a string
  5. 37Check whether a string is a palindrome
  6. 38Find the position of a character in a string
  7. 39Count lines, words and characters in a text

Miscellaneous

  1. 40Menu driven program for smallest, largest, sum and average
  2. 41Number and star pyramid patterns

Sorting and searching

  1. 42Linear search
  2. 43Binary search
  3. 44Bubble sort
  4. 45Selection sort in descending order
  5. 46Insertion sort
  6. 47Sort an array of names

Writing your lab record

  1. Aim: one sentence saying what the program does.
  2. Algorithm: the steps in plain words, before any code.
  3. Program: the code you wrote and ran yourself.
  4. 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.