C++ Data Type char array

C++ examples for Data Type:char array


Click the following links for the tutorial for Data Type and char array.

  1. The NULL Terminator
  2. C Style Strings in Arrays
  3. Asking for the your Name and store in char array
  4. Strcat allows us to join, or concatenate, two strings.
  5. Strcpy copies a string from one array into another.
  6. Strcmp compares two strings and returns 0 if they match.
  7. Strlen tells us how many characters are in a given string excluding the null terminator
  8. Building Strings with char array

  9. Concatenate two char array strings with a - in the middle
  10. Display an array of characters both using a pointer and an array index
  11. Store and initialize three character arrays
  12. Defines a string literal and uses it twice.
  13. Prints strings and characters from a character array.
  14. Counts the number of letters in the user's first name, while Loop until null zero is reached.
  15. Counts the number of letters in the user's first name.
  16. Stores a name in a character pointer.

  17. Prints the day of the week based on an input value.
  18. Inputs and outputs strings with gets_s and puts
  19. Copying Strings terminated by \0, C char array based string
  20. What does this program do? loop through \0 terminated string
  21. What does this program do? \0 terminated string
  22. Comparing Strings with strcmp and strncmp
  23. Using strcat and strncat to append two string together
  24. Using strcpy and strncpy to copy string
  25. Get string Length
  26. Using strtok to tokenize a string.
  27. Using strstr to search for the first occurrence of a substring
  28. Using strspn to get the length of the initial part of the string in for substring
  29. Using strrchr to search for the last occurrence of the specified character in a string.
  30. Using strpbrk searches for the first occurrence of a substring
  31. Using strcspn to get the length of the initial part of the string that does not contain any characters from another string.
  32. Using strchr to search char array based string
  33. Using strtoul to converts to char based string an unsigned long integer.
  34. Using memset to copy the byte into a specified number of bytes
  35. Using memchr to search for a byte
  36. Using memcmp to compare the specified number of characters
  37. Using memmove to copy the last 10 bytes of array x into the first 10 bytes of array x.
  38. Using memcpy to copy data in memory
  39. What Does the Program Do: char array based string
  40. Initializing pointers with strings
  41. Array of strings
  42. Create a string class based on char array
  43. Initialized string
  44. Simple string variable
  45. Copy a string using strcpy() function
  46. Copy a string using a for loop
  47. Copy one string to another with pointers
  48. Strings defined using array and pointer notation
  49. Displays a string with pointer notation
  50. Reverses a C-string
  51. Member function converts String objects to upper case
  52. Sort an array of pointers to strings
  53. Use strchr(), strpbrk(), and strstr() to search a null-terminated string.
  54. Use strcpy(), strcat(), strcmp(), and strlen() for basic null-terminated string functions.
  55. Create a case-insensitive string comparison function
  56. Make a reverse copy of a string.
  57. Reversing a string makes use of recursion.
  58. Reverse a string in place. Use pointers rather than array indexing.
  59. Reverse a string in place.
  60. Implement "search and replace" for null-terminated strings.
  61. Count words, lines, spaces, and punctuation in char array
  62. Count spaces, punctuation, digits, and letters.
  63. Use strtok( ) to tokenize a null-terminated string:
  64. Get next token