C String char array

C examples for String:char array

Description

Click the following links for the tutorial for String and char array.

  1. Initializing a char array as constant for standard messages
  2. Initialize part of an array of elements of type char with a string
  3. Initialize a string variable when you declare it
  4. Testing characters in a string with Character Classification Functions
  5. Handling Strings Using Pointers
  6. String Constants
  7. Copies the contents of one string into another by moving characters from both ends, converging in the middle with multiple loop control variables
  8. Use char pointer to access string constants


  9. Uses pointer to print the ASCII values associated with the characters contained in a string.
  10. Strings can be referenced through pointers and traversed similar to arrays.
  11. Assign string value to char pointer and char array
  12. Define and access Character Arrays
  13. Using Pointers to Find the Length of a String
  14. A string consists of an array of characters and is delimited by double quotes.
  15. Read from console and Store Strings using a pointer to char and a char type array
  16. Store Strings Without Initialization using a pointer to char and a char array


  17. Stores the strings using pointer to char and char type array
  18. Read and Store Strings Interactively using the malloc() function
  19. Swap Strings Logically, swaps the strings using an array of pointers to strings
  20. Swap Strings Physically, swap the strings in a 2-dimensional array of characters
  21. Read a Text File Character by Character and displays these contents on the screen
  22. Stepping through an array of structures using pointer notation.
  23. Count the number of characters in two strings, and return a pointer to the longer string.
  24. Copies one array of characters into another.
  25. Go through the string, displaying only those characters that are not lowercase vowels.
  26. Read lines from user and print the longest input line
  27. Write a program to print all input lines that are longer than 80 characters.
  28. Remove trailing blanks and tabs from each line of input, and to delete entirely blank lines.
  29. Reverses the character string s.
  30. Convert space blank to tab
  31. Use array of pointers for array of strings
  32. Use pointers for strings
  33. Get addresses of strings
  34. Read user input, alters input, preserving non-letters
  35. Repeats an input line but replaces each non-space character with the character that follows it in the ASCII code sequence.
  36. What does the following program print? string operation
  37. What will the following program print? string copy
  38. What will this program print? char array and pointer
  39. What will this program print?
  40. Reads a name from keyboard
  41. What does the following program print?
  42. Specifying the maximum number of characters that can be read.
  43. Reads the first word from a line of input into an array and discards the rest of the line.
  44. Read the first word from input into an array and discards the rest of the line
  45. Read string and stops after n characters or after the first blank, tab, or newline, whichever comes first
  46. Fetches the next n characters from input (including blanks, tabs, and newlines), storing the results in an array whose address is passed as an argument.
  47. Reports the number of words read from console, the number of uppercase letters, the number of lowercase letters, the number of punctuation
  48. Print each input character and its ASCII decimal value.
  49. Returns the first non- whitespace character encountered.
  50. Report the average number of letters per word.
  51. Reads input until end-of-file and echoes it to the display, convert to uppercase or lowercase