Strings are actually one-dimensional array of characters terminated by a null character '\0'. Each character in the array occupies one byte of memory, and the last character must always be 0.
Syntax:-
char ch[10]={'j', 'a', 'v', 'a', 't', 'p', 'o', 'i', 'n', 't', '\0'};
Exercises:-
- Write a C program to find length of a string.
- Write a C program to copy one string to another string.
- Write a C program to concatenate two strings.
- Write a C program to find reverse of a string.
- Write a C program to convert lowercase string to uppercase.
- Write a C program to convert uppercase string to lowercase.
Comments
Post a Comment