String:- A string in C is a list of characters that ends with a null character (\0).
There is no data type available to create strings in C language. To store string in C language, you create a character array. Therefore, the character array in C is also called string. The strings in C language terminate with null character (\0).
General syntex of string is:
First Method:- You create an array of a finite number and store one character of string in each of its indexes. A null character (\0) is stored in the last index of this array. It is necessary to do this.
There is no data type available to create strings in C language. To store string in C language, you create a character array. Therefore, the character array in C is also called string. The strings in C language terminate with null character (\0).
General syntex of string is:
First Method:- You create an array of a finite number and store one character of string in each of its indexes. A null character (\0) is stored in the last index of this array. It is necessary to do this.
1 Comments
Awsm
ReplyDelete