About 6,850,000 results
Open links in new tab
  1. Deleting string from array of strings (C) - Stack Overflow

    Nov 25, 2013 · Given a pointer to an array of char* pointers terminated with an empty string (or NULL), delete all strings in the pointer array that contain word. The resulting potentially …

  2. Removing strings from an array in c - Stack Overflow

    Sep 24, 2015 · const char *string[5]; string[0] = "White"; string[1] = "Black"; string[2] = "Blue"; string[3] = "Red"; string[4] = "Yellow"; gets(string); printf(//);

  3. Array of Strings in C - GeeksforGeeks

    Jan 10, 2025 · In C, an array of strings is a 2D array where each row contains a sequence of characters terminated by a ‘\0’ NULL character (strings). It is used to store multiple strings in a …

  4. How to delete a string from an array of string in c

    Jul 21, 2022 · Use strcpy() to copy strings. Or change it to an array of pointers, and allocate the strings dynamically. Although arrays are implemented with pointers in C, the compiler will treat …

  5. Remove all characters other than alphabets from string

    Jul 31, 2023 · To remove all the characters other than alphabets(a-z) && (A-Z), we just compare the character with the ASCII value, and for the character whose value does not lie in the range …

  6. How to Empty a Char Array in C? - GeeksforGeeks

    Dec 18, 2022 · Methods to empty a char Array in C are mentioned below: Using the NULL element ; Using strcpy to clear the string; Using memset to clear ; Clearing dynamic char array …

  7. C Program to Remove all Characters in a String Except Alphabets

    In this C programming example, you will learn to remove all the characters from a string entered by the user except the alphabets.

  8. How to delete a string in an array in C - Stack Overflow

    Nov 20, 2020 · For example, to delete a string from an array of strings means to delete all character content from that area of memory. i.e. either setting the first character of the string to …

  9. How to clear a char* string array in C - Ubuntu Forums

    Apr 15, 2010 · A couple of ways come to mind. Given that strings in C are usually terminated by an ASCII zero, the easiest would be to set the first byte to zero. Another way might be to use …

  10. C String Array: C -String Explained - Bito

    May 5, 2024 · Elements can be deleted from a C string array by overwriting them with new elements or shifting elements within the array. For example, if you want to delete element 2 …

Refresh