0% found this document useful (0 votes)
6 views6 pages

C Programming by R Garg

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views6 pages

C Programming by R Garg

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Department of Computer Science & Engineering

Meerut Institute of Technology, Meerut


C Programming

List of Programs
Practice Problem

Lab No. Problem Statement Tentative Level Practice /


Date (Easy/Moderate/ Assignment
Hard)
Topic -1 Input / Output Functions and Arithmetic Operators
1. WAP to print addition, subtraction, multiplication and Easy Practice
division of two numbers.

2. WAP to print an area of rectangle, square and circle with Easy Practice
dimensions provided by users

3. WAP to convert temperature from Celsius to Fahrenheit and Easy Practice


vice versa
4. WAP to swap two numbers. Easy Practice

5. WAP to swap two numbers without the help of a third Moderate Practice
variable
6. Write a program which takes input as integers only Moderate Practice
that is restrict other characters from input
7. Write a program which takes input only as character Moderate Practice
‘a’ that is restrict other characters from input
8. Write a program to implement the functions for the Hard Test
following conversions
S.No. From To S.No. From To
I. Decimal -> Binary VII. Hexadecimal -> Decimal
II. Decimal -> Octal VIII. Hexadecimal -> Octal
III. Decimal->Hexadecimal IX. Hexadecimal -> Binary
IV. Octal -> Decimal X. Binary -> Decimal
V. Octal -> Hexadecimal XI. Binary -> Octal
VI. Octal -> Binary XII. Binary -> Hexadecimal

9. WAP to find roots of a quadratic equation Hard / Tough Assignment-1

Topic -2 Conditional operators & switch statements


10. WAP to check whether the given number is even or odd. Easy Practice
11. WAP in C to find out the maximum of three numbers. Easy Practice

12. Write a program in C to check whether the entered year is a Moderate Practice
leap year or not.

13. Write a program to check whether a number is even or Moderate Practice


odd without using modulus(%) operator

14. WAP to input a character from the user & check that Easy Practice
entered character is vowel or consonant.(using switch case)

15. Write a menu program to perform arithmetic operation on Moderate Test


the basis of the requirement of the user.

Topic -3 Looping statements


16. WAP to print a table of any number inputted by the user. Easy Practice

17. Write a program to print first 10 natural numbers. Easy Practice

18. Write a program to count digits in a given number. Moderate Practice

19. WAP to input a multi digit number from the user and print Moderate Practice
the number in reverse order.

20. WAP to input a multi digit no. from the user and print the Moderate Practice
sum of its digits.

21. Write a program to print the following pattern: Hard / Tough Assignment-1

A
AB
ABC
ABCD
ABCDE
ABCDEF

Topic -4 Mathematics essential


22. WAP to print the fibonacci series of the given number. Easy Practice

23. WAP to check whether the number is palindrome or not. Easy Practice

24. A number is said to be an armstrong number if the sum of Moderate Practice


the cube of its digits is equal to the number itself.(ex: 153 is
an armstrong no. as 153= 13+53+33)

25. WAP to check if a number is a strong number Moderate Practice

26. WAP to check whether a number is prime or not. Moderate Practice

27. Write a program to print first N terms of Fibonacci Moderate Test


series
28. Write a program to implement the factorial of a number. Hard / Tough Assignment-1
Topic-5 Functions
29. Write a function to calculate factorial of a number Easy Practice

30. Write a function to calculate area of a circle. Easy Practice


31. Write a function to calculate sum of first N natural Moderate Practice
numbers.
32. Write a program to express a given number as a sum Moderate Test
of two prime numbers. Print all possible solutions

33. Write a function to print Pascal triangle Hard / Tough Assignment-1

Topic -6 Recursion
34. Write a recursive function to calculate factorial of a number. Easy Practice

35. Write a recursive function to find Nth term of Fibonacci Easy Practice
series.
36. Write a recursive function to sort an array. Moderate Practice

37. Write a recursive function to print first N natural number Moderate Practice

38. Write a recursive function to calculate sum of digits of a Moderate Practice


number
39. Write a recursive function to calculate sum of squares of Moderate Practice
digits of a number
40. Write a recursive function to print first N natural numbers in Moderate Test
reverse order.
41. Write a recursive function to calculate sum of cubes of first Hard / Tough Assignment-1
N natural numbers
Topic -7 Basic operations on Arrays
42. WAP to input and display elements of an array Easy Practice
43. WAP to find the sum of elements of an array. Easy Practice

44. WAP to find the average of elements in an array Moderate Practice

45. Program to find the maximum and minimum elements of an Moderate Test
array of ‘n’ elements.

46. Hard / Tough Assignment-1


WAP to perform linear search on the given array.
Topic -8 Advanced questions on arrays

47. WAP to copy elements from one array to another Easy Practice

48. WAP to count even and odd numbers in an array Easy Practice

49. WAP to remove duplicate elements from an array Moderate Practice


50. Moderate Practice
Write a program to rotate an array by k positions.

51. Write a program to merge two sorted arrays into a Moderate Practice
single sorted array.

52. Find the second largest element in an array without Moderate Test
sorting.

53. WAP to perform binary search on an array. Hard / Tough Assignment-1

Topic -9 Two dimensional array


54. WAP to input and display a matrix Easy Practice

55. WAP to calculate the addition of two matrices of size m*n. Easy Practice

56. WAP to print transpose of a matrix. Moderate Practice

57. WAP to calculate the multiplication of two matrices of size Moderate Test
3*3.
Topic -10 Basic operations on String
58. WAP to input and display a string Easy Practice
59. Write a user-defined function to calculate the length of Easy Practice
string.

60. Write a user-defined function to reverse a string. Moderate Practice

61. WAP to count vowels, consonants, digits and spaces in a Moderate Test
string
62. Hard / Tough Assignment-1
WAP to check whether a string is palindrome
Topic -11 Advanced operations on String

63. WAP to add or concatenate two strings. Easy Practice

64. WAP to copy one string to another Easy Practice

65. WAP to compare two string Moderate Practice

66. WAP to remove spaces from a string Moderate Test

67. Moderate Test


Write a program to check if a string is a rotation of another
string.
68. Write a program to find the longest palindrome substring in Moderate Test
a given string.
69. WAP to count the frequency of each character in a string Hard / Tough Assignment-1
70. Implement a program to count the occurrence of each word
in a sentence.

Topic -12 STRUCTURE

71. WAP to read and display employee details using structure Easy Practice
72. WAP to create and display a student structure Easy Practice

73. WAP to calculate average marks of students using structure Moderate Practice

74. WAP to pass structure to a function Moderate Test

75. Program to store information of students using structure. Hard / Tough Assignment-1
Topic -13 UNION

76. WAP to demonstrate use of union in C Easy Practice


77. WAP to compare memory usage of structure and union Easy Practice

78. WAP to input and display employee record using union Moderate Practice

79. WAP to use union in a nested structure Moderate Test

80. WAP to create a union for multiple data formats Hard / Tough Assignment-1
Topic -14 FILE HANDLING
81. WAP to open and close a file in C Easy Practice
82. Program to read and write in text file in C language. Easy Practice

83. WAP to copy content from one file to another Moderate Practice

84. WAP to count number of lines, words, and characters in file Moderate Test

85. Hard / Tough Assignment-1


WAP to merge two files into a third file
Topic -15 POINTERS
86. WAP to demonstrate the use of pointer to access a variable Easy Practice

87. WAP to swap two numbers using pointers Easy Practice

88. WAP to find the sum of elements of an array using pointers Moderate Practice

89. WAP to reverse a string using pointer (without using string Moderate Test
functions)
90. Easy
Write a program to implement pointer arithmetic on
arrays.
91. WAP to sort an array using pointer (Bubble Sort with Hard / Tough Assignment-1
pointer notation)
Topic -16 Dynamic Memory Allocation
92. WAP to demonstrate the use of malloc() to allocate memory Easy Practice
for an array
93. WAP to input and display elements using calloc() Easy Practice

94. WAP to reallocate memory using realloc() and show before- Moderate Practice
after effect
95. WAP to dynamically create a 2D array and find its Moderate Test
transpose
96. WAP to dynamically create a structure for student record Hard / Tough Assignment-1
and calculate average marks
Topic -17 SORTING
97. WAP to implement Bubble Sort on an integer array Easy Practice
98. WAP to implement Selection Sort on an array Easy Practice

99. WAP to implement Insertion Sort on an array Easy Practice

100. WAP to implement Merge Sort on an array Moderate Practice

101. WAP to implement Quick Sort on an array Moderate Test

102. WAP to implement Heap Sort on an array Hard / Tough Assignment-1

You might also like