String Exercises in c language

Write a C program to read elements in a matrix and check whether the given matrix is symmetric matrix or not. How to check symmetric matrix in C. Logic to check symmetric matrix in C programming.

Required knowledge

Basic C programming, C for loop, Array, Pointer, functions,

  • Strings

    List of string programming exercises

    1. C program to find length of a string using Loop.
    2. C program to find length of a string using while Loop.
    3. C program to find length of a string using while Loop(transform while to an empty).
    4. C program to find length of a string using while Loop and pointer.
    5. C program to find length of a string using strlen() string function.
    6. C program o copy one string to another string without using strcpy() and using for Loop.
    7. C program to copy one string to another string using while Loop.
    8. C program to copy one string to another string using while empty Loop.
    9. C program to copy one string to another string using while empty Loop and pointers.
    10. C program to copy one string to another string using strcpy() function.
    11. C program to concatenate two strings using while loop.
    12. C program to concatenate two strings using while empty loop.
    13. C program to concatenate two strings using while empty loop and pointers.
    14. C program to concatenate two strings using strcat() function.
    15. C program to compare two string without using string library functions and with using loop.
    16. C program to compare two string using pointer.
    17. C program to compare two string using strcmp() function.
    18. C program to convert string lower case to uppercase.
    19. C program to convert string lower case to uppercase using Loop and pointer.
    20. C program to convert lowercase to uppercase string using strupr().
    21. C program to convert uppercase to lowercase string using Loop.
    22. C program to convert uppercase to lowercase string using strlwr() string function.
    23. C program to toggle case of a string using while loop / लूप का उपयोग करते हुए एक स्ट्रिंग के मामले को टॉगल करने के लिए सी प्रोग्राम।
    24. C program to count total number of alphabets, digits and special characters in a string using pointers and while loop / सी प्रोग्राम पॉइंटर्स और लूप का उपयोग करके स्ट्रिंग में कुल अक्षर, अंकों और विशेष वर्णों को गिनने के लिए।
    25. C program to count total number of vowel or consonant in a string using for loop./ लूप का उपयोग करके स्ट्रिंग में स्वर या व्यंजन की कुल संख्या को गिनने का सी प्रोग्राम।
    26. C program to count total number of vowel or consonant in a string using switch case. / C प्रोग्राम स्विच केस का उपयोग करके स्ट्रिंग में कुल स्वर या व्यंजन की संख्या की गणना करने के लिए।
    27. C program to count total number of vowel or consonant in a string using switch case and pointer. / C प्रोग्राम स्विच केस और पॉइंटर का उपयोग करके एक स्ट्रिंग में स्वर या व्यंजन की कुल संख्या की गणना करने के लिए।
    28. C program to count number of word in string using unlimited while loop. / सी प्रोग्राम लूप में असीमित का उपयोग करते हुए स्ट्रिंग में शब्द की संख्या की गणना करने के लिए
    29. C program to find reverse of a string using while loop. | लूप का उपयोग करके स्ट्रिंग के रिवर्स खोजने के लिए सी प्रोग्राम।
    30. C program to find reverse of a string using while loop and pointer. | सी प्रोग्राम लूप और पॉइंटर का उपयोग करते हुए एक स्ट्रिंग के रिवर्स खोजने के लिए।
    31. C program to find reverse of a string using strrev() function. | सी प्रोग्राम स्ट्र्रेव () फ़ंक्शन का उपयोग करके एक स्ट्रिंग के रिवर्स खोजने के लिए।
    32. C program to check whether a string is palindrome or not using while loop. | सी प्रोग्राम यह जांचने के लिए है कि लूप करते समय कोई स्ट्रिंग पैलिंड्रोम है या नहीं।
    33. C program to check whether a string is palindrome or not using string functions. | C प्रोग्राम यह जांचने के लिए है कि क्या कोई स्ट्रिंग पैलिंड्रोम है या स्ट्रिंग फ़ंक्शन का उपयोग नहीं कर रहा है।
    34. C program to reverse order of words in a string using while loop.| लूप का उपयोग करके स्ट्रिंग में शब्दों के क्रम को रिवर्स करने का कार्यक्रम।
    35. C program to find the first occurrence of a character in a string using while loop. | लूप का उपयोग करते हुए एक स्ट्रिंग में एक चरित्र की पहली घटना को खोजने के लिए सी कार्यक्रम।
    36. C program to find the last occurrence of a character in a string using while loop. | सागर कार्यक्रम के साथ विली लूप का उपयोग करते हुए स्ट्रिंग में चरित्र की अंतिम घटना का पता लगाएं।
    37. C program to search all occurrences of a character in a given string using while loop. | सी प्रोग्राम के साथ विली लूप का उपयोग करते हुए दिए गए स्ट्रिंग में एक पात्र के सभी अवसरों को खोजें।
    38. C program to count the total number of occurrences of a character in a string using a while loop. | सी प्रोग्राम एक लूप का उपयोग करके स्ट्रिंग में एक चरित्र की घटनाओं की कुल संख्या को गिनने के लिए।
    39. C program to find the maximum occurring character in a string using a while loop. | सी प्रोग्राम एक लूप का उपयोग करके स्ट्रिंग में अधिकतम होने वाले चरित्र को खोजने के लिए।
    40. C program to find the minimum occurring character in a string using a while loop. | सी प्रोग्राम एक लूप का उपयोग करके स्ट्रिंग में न्यूनतम होने वाले चरित्र को खोजने के लिए।
    41. C program to count the frequency of each character in a string using a for a loop. | लूप के लिए उपयोग करके स्ट्रिंग में प्रत्येक वर्ण की आवृत्ति को गिनने का सी प्रोग्राम।
    42. C program to remove the first occurrence of a character from string using a while a loop. | सी प्रोग्राम एक लूप का उपयोग करके स्ट्रिंग से एक चरित्र की पहली घटना को हटाने के लिए।
    43. C program to remove the last occurrence of a character from the string using a while a loop. | थोड़ी देर लूप का उपयोग करके स्ट्रिंग से एक चरित्र की अंतिम घटना को हटाने के लिए सी कार्यक्रम।
    44. C program to remove all occurrences of a character from the entered string using a while a loop.| सी प्रोग्राम एक लूप का उपयोग करते हुए दर्ज स्ट्रिंग से एक चरित्र की सभी घटनाओं को हटाने के लिए।
    45. C program to remove all repeated characters in the entered string using a while a loop. | सी प्रोग्राम एक लूप का उपयोग करते हुए दर्ज स्ट्रिंग में सभी दोहराया पात्रों को हटाने के लिए।
    46. C program to replace the first occurrence of a character in the entered string using a while a loop. | C प्रोग्राम एक लूप का उपयोग करते हुए दर्ज स्ट्रिंग में एक चरित्र की पहली घटना को बदलने के लिए।

    1. Write a C program to replace last occurrence of a character with another in a string.
    2. Write a C program to replace all occurrences of a character with another in a string.
    3. Write a C program to find first occurrence of a word in a given string.
    4. Write a C program to find last occurrence of a word in a given string.
    5. Write a C program to search all occurrences of a word in given string.
    6. Write a C program to count occurrences of a word in a given string.
    7. Write a C program to remove first occurrence of a word from string.
    8. Write a C program to remove last occurrence of a word in given string.
    9. Write a C program to remove all occurrence of a word in given string.
    10. Write a C program to trim leading white space characters from given string.
    11. Write a C program to trim trailing white space characters from given string.
    12. Write a C program to trim both leading and trailing white space characters from given string.
    13. Write a C program to remove all extra blank spaces from given string.



  • Instagram