Thursday, October 2, 2014

standard string functions

Strings:
The group of characters, digits and symbols enclosed within quotes is called as strings or character arrays. Strings are always terminated with „\0‟ character(NULL).
Example:
char name[ ] = {‘H’,’E’,’L’,’L’,’O’};
Standard String Functions:
· strlen( )
· strcpy( )
· strncpy( )
· stricmp( )
· strcmp( )
· strncmp( )
· strcat( )
· strrev( ) etc.,
Example program:
· To read and display a string.
· Program to count the number of lines, words and characters in a text.

No comments:

Post a Comment