List of C Program Scenarios
List of C Program Scenarios
List of C Program Scenarios
Page 1 of 5
NMIMS University
Mukesh Patel School of Technology Management & Engg (Mumbai)
Programming for Problem Solving (PPS)
B.Tech. EXTC Sem II AY 2018-19
C Program Scenarios for Practice
Faculty Incharge: Pratidnya S. Hegde Patil
Page 2 of 5
NMIMS University
Mukesh Patel School of Technology Management & Engg (Mumbai)
Programming for Problem Solving (PPS)
B.Tech. EXTC Sem II AY 2018-19
C Program Scenarios for Practice
Faculty Incharge: Pratidnya S. Hegde Patil
Programs on Recursion
50. C program to add natural numbers from 1 to n using recursion.
51. C program to find factorial using recursion.
52. Reverse a string using recursion.
53. C program to print fibonacci series till n using recursion.
54. C program to calculate power of a number using recursion. For example (2^3=8).
Page 3 of 5
NMIMS University
Mukesh Patel School of Technology Management & Engg (Mumbai)
Programming for Problem Solving (PPS)
B.Tech. EXTC Sem II AY 2018-19
C Program Scenarios for Practice
Faculty Incharge: Pratidnya S. Hegde Patil
55. C program to count digits of a number using recursion. For example: input value is 34562, and
then total number of digits is: 5.
56. C program to find sum of all digits using recursion. For example: input value is 34562, and then
sum of all digits is: 20.
57. C program to calculate length of the string using recursion.
58. To convert decimal number to its binary equivalent using recursion. For example decimal 10
= binary 1010.
59. Print the reverse of an inputted string using recursion.
Programs on Strings
(One-dimensional array)
71. C Program to Find the Frequency of Characters in a String.
72. C Program to Find the Number of Vowels, Consonants, Digits and White space in a String
73. C Program to Find the Length of a String
74. C program to Concatenate Two Strings
75. C Program to Copy a String
Page 4 of 5
NMIMS University
Mukesh Patel School of Technology Management & Engg (Mumbai)
Programming for Problem Solving (PPS)
B.Tech. EXTC Sem II AY 2018-19
C Program Scenarios for Practice
Faculty Incharge: Pratidnya S. Hegde Patil
Programs on Structures
86. Store information (roll, name, percentage) of one student using structure and print it on the
screen.
87. Store information (roll, name, percentage) of n students using array of structure and print
each student information.
88. Display a student’s record with the given roll number as input.
89. Create a shopping bill with (item, quantity, rate) for n items and then print the final bill amount
payable. (price=quantity*rate and bill amount=addition of all item prices).
90. Add two distances having (inch, feet) using structures.
91. Add two complex numbers having (real, imaginary) using structures by passing the structure
variable to a function.
92. Create a union of student(roll, name, percentage) and display the union elements.
Programs on Pointers
93. Swap two values through a function using call by reference and compare with swap function
using call by value.
94. Reverse a string through a function using pointer.
95. Dynamically create an array of n elements using malloc() and search a given number in it.
96. Comparing two strings using pointers.
97. Search for a character in a string using pointers.
98. Count the length of a string using pointer.
99. A function to return more than one value (sum, average) of two numbers using pointer.
100. Concatenate two strings using pointers.
Page 5 of 5