C Program string Function
C STRING FUNCTIONS:
- String.h header file supports all the string functions in C language. All the string functions are given below.
- Click on each string function name below for detail description and example programs.
Required knowledge :
- strdup
- strchr
- strrchr
- strstr
- strset
- strnset
- strrev
In this tutorial we will learn how to pass and use strings in functions in C programming language.
We know that a string is a sequence of characters enclosed in double quotes.
For example, "Hello World" is a string and it consists of a sequence of English letters in both uppercase and lowercase and the two words are separated by a white space. So, there are total 11 characters.
We know that a string in C programming language ends with a NULL
\0 character. So, in order to save the above string we will need an array of size 12. The first 11 places will be used to store the words and the space and the 12th place will be used to hold the NULL character to mark the end.

No comments