Practice Sets PDF
Practice Sets PDF
1 8 15 22 29 36 43
1 a
123 abc
12345 abcde
53 54 1234567 55 abcdefg
12345 abcde
123 abc
1 a
Hello Everybody!
Hello Everybody
Hello Everybod
Hello Everybo
Hello Everyb PASCAL TRIANGLE
Hello Every 1
Hello Ever 232
Hello Eve 34543
56 57 58
Hello Ev 4567654
Hello E 567898765
Hello
Hello
Hell
Hel
He
H
0
909
89098
1
7890987
4 9 16
678909876
25 36 49 64 81
59 60 56789098765 61
100 121 144 169 196 225 256
4567890987654
289 324 361 400 441 484 529 576 625
345678909876543
23456789098765432
1234567890987654321
Programs on Strings
1. Write a C program to find length of a string.
2. Write a C program to copy one string to another string.
3. Write a C program to concatenate two strings.
4. Write a C program to compare two strings.
5. Write a C program to convert lowercase string to uppercase.
6. Write a C program to convert uppercase string to lowercase.
7. Write a C program to toggle case of each character of a string.
8. Write a C program to find total number of alphabets, digits or special character in a string.
9. Write a C program to count total number of vowels and consonants in a string.
10. Write a C program to count total number of words in a string.
11. Write a C program to find reverse of a string.
12. Write a C program to check whether a string is palindrome or not.
13. Write a C program to reverse order of words in a given string.
14. Write a C program to find first occurrence of a character in a given string.
15. Write a C program to find last occurrence of a character in a given string.
16. Write a C program to search all occurrences of a character in given string.
17. Write a C program to count occurrences of a character in given string.
18. Write a C program to find highest frequency character in a string.
19. Write a C program to find lowest frequency character in a string.
20. Write a C program to count frequency of each character in a string.
21. Write a C program to remove first occurrence of a character from string.
22. Write a C program to remove last occurrence of a character from string.
23. Write a C program to remove all occurrences of a character from string.
24. Write a C program to remove all repeated characters from a given string.
25. Write a C program to replace first occurrence of a character with another in a string.
26. Write a C program to replace last occurrence of a character with another in a string.
27. Write a C program to replace all occurrences of a character with another in a string.
28. Write a C program to find first occurrence of a word in a given string.
29. Write a C program to find last occurrence of a word in a given string.
30. Write a C program to search all occurrences of a word in given string.
31. Write a C program to count occurrences of a word in a given string.
32. Write a C program to remove first occurrence of a word from string.
33. Write a C program to remove last occurrence of a word in given string.
34. Write a C program to remove all occurrence of a word in given string.
35. Write a C program to trim leading white space characters from given string.
36. Write a C program to trim trailing white space characters from given string.
37. Write a C program to trim both leading and trailing white space characters from given string.
38. Write a C program to remove all extra blank spaces from given string.