0% found this document useful (0 votes)
64 views2 pages

Practice Sets PDF

The document contains two sections. The first section contains a pattern printing program that prints numbers and letters in various patterns. The second section lists 38 problems involving string manipulation programs in C, such as programs to find the length of a string, concatenate two strings, compare strings, and perform other operations on strings.
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)
64 views2 pages

Practice Sets PDF

The document contains two sections. The first section contains a pattern printing program that prints numbers and letters in various patterns. The second section lists 38 problems involving string manipulation programs in C, such as programs to find the length of a string, concatenate two strings, compare strings, and perform other operations on strings.
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/ 2

Pattern printing programs

1 8 15 22 29 36 43

1 12345 1 12345 1 12345


123 12 1234 12 1234 12 1234
2 123 9 123 16 123 23 123 30 123 37 123 44 123
123 1234 12 1234 12 1234 12
12345 1 12345 1 12345 1
a abcde a abcde a abcde
abc ab abcd ab abcd ab abcd
3 abc 10 abc 17 abc 24 abc 31 abc 38 abc 45 abc
abc abcd ab abcd ab abcd ab
abcde a abcde a abcde a
A AAAAA A AAAAA A AAAAA
AAA BB BBBB BB BBBB BB BBBB
4 BBB 11 CCC 18 CCC 25 CCC 32 CCC 39 CCC 46 CCC
CCC DDDD DD DDDD DD DDDD DD
EEEEE E EEEEE E EEEEE E
1 55555 1 55555 1 55555
111 22 4444 22 4444 22 4444
5 222 12 333 19 333 26 333 33 333 40 333 47 333
333 4444 22 4444 22 4444 22
55555 1 55555 1 55555 1
Flloyd’s
Triangle 1 2 3 4 1 1 234 1 1 2 3 4
123
1 5 6 7 23 567 23 5 6 7
6 456 13 20 27 34 41 48
23 8 9 456 89 456 8 9
789
456 10 7 8 9 10 10 7 8 9 10 10
7 8 9 10
a abcd a abcd a abcd
abc
b c efg b c efg bc efg
7 def 14 21 28 35 42 49
d e f hi d e f hi def hi
ghi
g h i j j g h i j j ghIj j
1 A a
1 2 B C b c
50 51 52
1 2 3 D E F d e f
1 2 3 4 G H I J g h i j

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.

You might also like