Professional Documents
Culture Documents
2. Write a program to delete prime numbers from given array , print the remaining elements of an array
4. Write a program to find second largest and second smallest elements in given array
5. Write a program to find sum and average for a given number of array elements
Programs on Strings
(without string handling functions)
16. Write a program to reverse a string
17. Write a program to copy one string into another string
18. Write a program to compare two string
19. Write a program to check whether a given string is palindrome or not
20. Write a program to sort the alphabets given in a string(dictionary order)
21. Write a program to find the number of spaces, characters, lines, words in a given paragraph
22. Write a program to check whether two strings are anagrams or not
23. Write a program to insert a substring at a specified position in a given string
24. Write a program to find number of occurrences of a given substring in a string
25. Write a program to convert all lower case letters to upper case and vice-versa
35. Write a program to delete prime numbers from given array , print the remaining elements of an
array
37. Write a program to find second largest and second smallest elements in given array
38. Write a program to find sum and average for a given number of array elements
Programs on Strings
(without string handling functions)
49. Write a program to reverse a string
50. Write a program to copy one string into another string
51. Write a program to compare two string
52. Write a program to check whether a given string is palindrome or not
53. Write a program to sort the alphabets given in a string(dictionary order)
54. Write a program to find the number of spaces, characters, lines, words in a given paragraph
55. Write a program to check whether two strings are anagrams or not
56. Write a program to insert a substring at a specified position in a given string
57. Write a program to find number of occurrences of a given substring in a string
58. Write a program to convert all lower case letters to upper case and vice-versa
Programs on Structures:
1. Write a program to read a student data like name, rollno, marks in 6
subjects and calculate the percentage, grade and print all the details
of a student using structures.
2. Implement the above same program to print the details of 5 students
using arrays of structures.
3. Demonstrate the concept of nested structures to print the college and
any 3 department details.
4. Write a program to read and print unions.
5. Write a program to demonstrate various ways of passing structure
to a function
i) Member by member
ii) Structure passing
iii) Structure passing and returning a structure
Programs on Pointers:
Programs on Files:
1. Write a program to read a paragraph and store it in a file. Extract
file content to calculate number of words, number of lines ,
number of spaces and number of characters in it.
2. Write a program to store ‘n’ number of integers in a file. Extract
file content and separate even numbers and store in file named
evenfile and odd numbers should be stored in file named oddfile.
3. Write a program to create a text file and replace the word “is” with
“##” in the same file..
4. Write a program to create a text file and replace every 5th character
with “#”
5. Write a program to store 5 student details(Rno, Name, Percentage )
in a file in a tabular form and extract the same from the file(use
fscanf() and fprintf())
6. Write a program to read three integers at run time and find the
greatest of these three numbers(use command line arguments)
7. Write a program to view content of a text file using command line
arguments
8. Write a program to create a text file using command line
arguments
9. Write a program to copy content of one file into another using
command line arguments
10. Create a utility file in which functions to find sum of array
elements, sort of array elements, maximum of array elements,
minimum of array elements will be there. Main program has to
include this file and use the functionalities