JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

MN108ES: C PROGRAMMING AND DATA STRUCTURES LABORATORY

B.Tech I Year I Semester (R22)

Course Objectives

Introduce the importance of programming, C language constructs, program

development, data structures, searching and sorting.

Course Outcomes:

  • 1. Develop modular and readable C Programs
  • 2. Solve problems using strings, functions
  • 3. Handle data in files
  • 4. Implement stacks, queues using arrays, linked lists.
  • 5. To understand and analyze various searching and sorting algorithms.

List of Experiments:

  • 1. Write a C program to find the sum of individual digits of a positive integer.
  • 2. 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.
  • 3. Write a C program to generate all the prime numbers between 1 and n, where n is a value supplied by the user.
  • 4. Write a C program to find the roots of a quadratic equation.
  • 5. Write a C program to find the factorial of a given integer.
  • 6. Write a C program to find the GCD (greatest common divisor) of two given integers.
  • 7. Write a C program to solve Towers of Hanoi problem.
  • 8. 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)
  • 9. Write a C program to find both the largest and smallest number in a list of integers.
  • 10. Write a C program that uses functions to perform the following:
  • i) Addition of Two Matrices
  • ii) Multiplication of Two Matrices
  • 11. Write a C program that uses functions to perform the following operations:
  • i) To insert a sub-string in to a given main string from a given position.
  • ii) To delete n Characters from a given position in a given string.
  • 12. Write a C program to determine if the given string is a palindrome or not
  • 13. Write a C program that displays the position or index in the string S where the string T begins, or – 1 if S doesn’t contain T.
  • 14. Write a C program to count the lines, words and characters in a given text.
  • 15. Write a C program to generate Pascal’s triangle.
  • 16. Write a C program to construct a pyramid of numbers.
  • 17. Write a C program that uses functions to perform the following operations:
  • i) Reading a complex number
  • ii) Writing a complex number
  • iii) Addition of two complex numbers
  • iv) Multiplication of two complex numbers (Note: represent complex number using a structure.) 18.
  • i. Write a C program which copies one file to another.
  • ii. Write a C program to reverse the first n characters in a file. (Note: The file name and n are specified on the command line.) 19.
  • i. Write a C program to display the contents of a file.
  • ii. Write a C program to merge two files into a third file (i.e., the contents of the first file followed by those of the second are put in the third file)
  • 20. Write a C program that uses functions to perform the following operations on singly linked list.:
  • i) Creation ii) Insertion iii) Deletion iv) Traversal
  • 21. Write C programs that implement stack (its operations) using
  • i) Arrays ii) Pointers
  • 22. Write C programs that implement Queue (its operations) using
  • i) Arrays ii) Pointers
  • 23. Write a C program that implements the following sorting methods to sort a given list of integers in ascending order i) Bubble sort ii) Selection sort iii)Insertion sort
  • 24. Write C programs that use both recursive and non recursive functions to perform the following searching operations for a Key value in a given list of integers:
  • i) Linear search ii) Binary search

TEXT BOOKS:

  • 1. C Programming & Data Structures, B.A. Forouzan and R. F. Gilberg, Third Edition, Cengage Learning.
  • 2. Let us C, Yeswanth Kanitkar
  • 3. C Programming, Balaguruswamy.

Loading Question Papers

Fetching data from database...