Practice 30 Top C Programming Questions on String


Q1. Write a program to find the length of a string without using the strlen function.  

Q2. Write a program to copy a string to another variable without using the strcpy function.  

Q3. Write a program to reverse a string without using library functions.  

Q4. Write a program to concatenate two strings without using the strcat function.  

Q5. Write a program to convert all lowercase letters in a string to uppercase.  

Q6. Write a program to convert all uppercase letters in a string to lowercase.  

Q7. Write a program to count the number of vowels and consonants in a string.  

Q8. Write a program to check if a string is a palindrome.  

Q9. Write a program to count the number of words in a string.  

Q10. Write a program to compare two strings and check if they are equal.  

Q11. Write a program to count the frequency of a specific character in a string.  

Q12. Write a program to check if a string contains only numeric digits.  

Q13. Write a program to convert a numeric string into an integer (without using atoi).  

Q14. Write a program to replace all occurrences of a character in a string with another character.  

Q15. Write a program to count the number of uppercase and lowercase letters in a string.  

Q16. Write a program to find the first occurrence of a character in a string.  

Q17. Write a program to remove all spaces from a string.  

Q18. Write a program to reverse each word in a string.  

Q19. Write a program to check if one string is a substring of another.  

Q20. Write a program to count alphabets, digits, and special characters in a string.  

Q21. Write a program to convert a string to lowercase without using library functions.  

Q22. Write a program to convert a string to uppercase without using library functions.  

Q23. Write a program to find the last occurrence of a character in a string.  

Q24. Write a program to check if two strings are equal.  

Q25. Write a program to find the length of a string without using the strlen() function.  

Q26. Write a program to copy one string into another without using library functions.  

Q27. Write a program to find palindrome strings from an array of strings.  

Q28. Write a program to concatenate two strings without using strcat().  

Q29. Write a program to count the number of words in a string.  

Q30. Write a program to split a string into words by spaces.  

Social Share

Bikki Singh

Hi, I am the instructor of TechnoVlogs. I have a strong love for programming and enjoy teaching through practical examples. I made this site to help people improve their coding skills by solving real-world problems. With years of experience, my goal is to make learning programming easy and fun for everyone. Let's learn and grow together!

Programming Languages